-
Notifications
You must be signed in to change notification settings - Fork 11
61 lines (53 loc) · 1.49 KB
/
user-identity-mapper.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: user-identity-mapper
on:
push:
branches:
- master
tags-ignore:
- '*.*'
env:
GOPATH: /tmp/go
IMAGE_REGISTRY: quay.io
REGISTRY_USER: "codeready-toolchain+push"
REGISTRY_PASSWORD: ${{ secrets.QUAY_PASSWORD }}
jobs:
image:
name: Build and push to quay.io
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles ('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Buildah Action
id: build-image
uses: redhat-actions/buildah-build@v2
with:
image: codeready-toolchain/user-identity-mapper
tags: latest
containerfiles: |
cmd/user-identity-mapper/Dockerfile
- name: Log into quay.io
uses: redhat-actions/podman-login@v1
with:
registry: ${{ env.IMAGE_REGISTRY }}
username: ${{ env.REGISTRY_USER }}
password: ${{ env.REGISTRY_PASSWORD }}
- name: Push to quay.io
id: push-to-quay
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-image.outputs.image }}
tags: ${{ steps.build-image.outputs.tags }}
registry: quay.io