1111
1212jobs :
1313 build-and-push :
14+ environment : ${{ github.event_name == 'release' && 'production' || 'staging' }}
1415 permissions :
1516 contents : read
1617 packages : write
@@ -20,50 +21,52 @@ jobs:
2021 runs-on : ubuntu-latest
2122
2223 steps :
23- - name : Checkout repository
24- uses : actions/checkout@v4
24+ - name : Checkout repository
25+ uses : actions/checkout@v4
2526
26- - name : Log in to GitHub Container Registry
27- uses : docker/login-action@v3.4.0
28- with :
29- registry : ghcr.io
30- username : ${{ github.actor }}
31- password : ${{ secrets.GITHUB_TOKEN }}
27+ - name : Log in to GitHub Container Registry
28+ uses : docker/login-action@v3.4.0
29+ with :
30+ registry : ghcr.io
31+ username : ${{ github.actor }}
32+ password : ${{ secrets.GITHUB_TOKEN }}
3233
33- - name : Extract metadata
34- id : meta
35- uses : docker/metadata-action@v5
36- with :
37- images : ghcr.io/datum-cloud/auth-ui
38- tags : |
39- type=ref,event=pr,suffix=-{{commit_date 'YYYYMMDD-HHmmss'}},prefix=v0.0.0-
40- type=ref,event=pr,prefix=v0.0.0-
41- type=ref,event=branch,suffix=-{{commit_date 'YYYYMMDD-HHmmss'}},prefix=v0.0.0-
42- type=ref,event=branch,prefix=v0.0.0-
43- type=semver,pattern=v{{version}}
44- type=semver,pattern=v{{major}}.{{minor}}
45- type=semver,pattern=v{{major}}
46- type=sha,prefix=v0.0.0-
34+ - name : Extract metadata
35+ id : meta
36+ uses : docker/metadata-action@v5
37+ with :
38+ images : ghcr.io/datum-cloud/auth-ui
39+ tags : |
40+ type=ref,event=pr,suffix=-{{commit_date 'YYYYMMDD-HHmmss'}},prefix=v0.0.0-
41+ type=ref,event=pr,prefix=v0.0.0-
42+ type=ref,event=branch,suffix=-{{commit_date 'YYYYMMDD-HHmmss'}},prefix=v0.0.0-
43+ type=ref,event=branch,prefix=v0.0.0-
44+ type=semver,pattern=v{{version}}
45+ type=semver,pattern=v{{major}}.{{minor}}
46+ type=semver,pattern=v{{major}}
47+ type=sha,prefix=v0.0.0-
4748
48- - name : Build Auth UI Docker image
49- run : make login_standalone_build
49+ - name : Build Auth UI Docker image
50+ env :
51+ SENTRY_AUTH_TOKEN : ${{ secrets.SENTRY_AUTH_TOKEN }}
52+ run : make login_standalone_build
53+
54+ - name : Tag and push image to GHCR
55+ env :
56+ TAGS : ${{ steps.meta.outputs.tags }}
57+ LABELS : ${{ steps.meta.outputs.labels }}
58+ IMAGE_VERSION : ${{ steps.meta.outputs.version }}
59+ run : |
60+ IMAGE="zitadel-login:${IMAGE_VERSION}"
61+ echo "Pushing $IMAGE with tags: $TAGS"
62+ # Convert tags (newline or comma separated) into space-separated list
63+ for TAG in $(echo "$TAGS" | tr '\n' ' '); do
64+ echo "Tagging $IMAGE as $TAG"
65+ docker tag "$IMAGE" "$TAG"
66+ echo "Pushing $TAG"
67+ docker push "$TAG"
68+ done
5069
51- - name : Tag and push image to GHCR
52- env :
53- TAGS : ${{ steps.meta.outputs.tags }}
54- LABELS : ${{ steps.meta.outputs.labels }}
55- IMAGE_VERSION : ${{ steps.meta.outputs.version }}
56- run : |
57- IMAGE="zitadel-login:${IMAGE_VERSION}"
58- echo "Pushing $IMAGE with tags: $TAGS"
59- # Convert tags (newline or comma separated) into space-separated list
60- for TAG in $(echo "$TAGS" | tr '\n' ' '); do
61- echo "Tagging $IMAGE as $TAG"
62- docker tag "$IMAGE" "$TAG"
63- echo "Pushing $TAG"
64- docker push "$TAG"
65- done
66-
6770 publish-kustomize-bundles :
6871 # Add explicit dependency so that the kustomize bundles only get published
6972 # if the container image has been built successfully. This helps prevent
8083 bundle-path : config
8184 image-overlays : config/base
8285 image-name : ghcr.io/datum-cloud/auth-ui
83- secrets : inherit
86+ secrets : inherit
0 commit comments