forked from zitadel/typescript
-
Notifications
You must be signed in to change notification settings - Fork 1
74 lines (65 loc) · 2.07 KB
/
Copy pathbuild-authui.yml
File metadata and controls
74 lines (65 loc) · 2.07 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Build and Publish Docker Image
on:
push:
release:
types: ["published"]
jobs:
build-and-push:
permissions:
contents: read
packages: write
attestations: write
id-token: write
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3.4.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/datum-cloud/auth-ui
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=ref,event=branch,suffix=-{{commit_date 'YYYYMMDD-HHmmss'}}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
type=raw,value=latest,enable={{is_default_branch}}
type=raw,value=latest,enable=${{ github.event_name == 'release' }}
- name: Build Auth UI Docker image
run: make login_standalone_build
- name: Tag and push image to GHCR
env:
TAGS: ${{ steps.meta.outputs.tags }}
LABELS: ${{ steps.meta.outputs.labels }}
IMAGE_VERSION: ${{ steps.meta.outputs.version }}
run: |
IMAGE="zitadel-login:${IMAGE_VERSION}"
echo "Pushing $IMAGE with tags: $TAGS"
# Convert tags (newline or comma separated) into space-separated list
for TAG in $(echo "$TAGS" | tr '\n' ' '); do
echo "Tagging $IMAGE as $TAG"
docker tag "$IMAGE" "$TAG"
echo "Pushing $TAG"
docker push "$TAG"
done
publish-kustomize-bundles:
permissions:
id-token: write
contents: read
packages: write
uses: datum-cloud/actions/.github/workflows/publish-kustomize-bundle.yaml@v1.5.1
with:
bundle-name: ghcr.io/datum-cloud/auth-ui-kustomize
bundle-path: config
secrets: inherit