Skip to content

Commit b1048dd

Browse files
committed
chore: add GitHub Actions workflow for building and publishing Docker image
1 parent c29fd49 commit b1048dd

4 files changed

Lines changed: 60 additions & 112 deletions

File tree

.github/workflows/build-authui.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Build and Publish Docker Image
2+
3+
on:
4+
push:
5+
release:
6+
types: ["published"]
7+
8+
jobs:
9+
build-and-push:
10+
permissions:
11+
contents: read
12+
packages: write
13+
attestations: write
14+
id-token: write
15+
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
22+
- name: Log in to GitHub Container Registry
23+
uses: docker/login-action@v3.4.0
24+
with:
25+
registry: ghcr.io
26+
username: ${{ github.actor }}
27+
password: ${{ secrets.GITHUB_TOKEN }}
28+
29+
- name: Extract metadata
30+
id: meta
31+
uses: docker/metadata-action@v5
32+
with:
33+
images: ghcr.io/datum-cloud/auth-ui
34+
tags: |
35+
type=schedule
36+
type=ref,event=branch
37+
type=ref,event=pr
38+
type=ref,event=branch,suffix=-{{commit_date 'YYYYMMDD-HHmmss'}}
39+
type=semver,pattern={{version}}
40+
type=semver,pattern={{major}}.{{minor}}
41+
type=semver,pattern={{major}}
42+
type=sha
43+
44+
- name: Build Auth UI Docker image
45+
run: make login_standalone_build
46+
47+
- name: Tag and push image to GHCR
48+
env:
49+
TAGS: ${{ steps.meta.outputs.tags }}
50+
LABELS: ${{ steps.meta.outputs.labels }}
51+
run: |
52+
IMAGE=zitadel-login:local
53+
echo "Pushing $IMAGE with tags: $TAGS"
54+
# Convert tags (newline or comma separated) into space-separated list
55+
for TAG in $(echo "$TAGS" | tr '\n' ' '); do
56+
echo "Tagging $IMAGE as $TAG"
57+
docker tag "$IMAGE" "$TAG"
58+
echo "Pushing $TAG"
59+
docker push "$TAG"
60+
done

.github/workflows/close_pr.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/workflows/issues.yml

Lines changed: 0 additions & 41 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)