Merge pull request #412 from zitadel/publish-image

feat: publish standalone docker image
This commit is contained in:
Elio Bischof
2025-04-04 11:02:00 +02:00
committed by GitHub
2 changed files with 37 additions and 6 deletions

View File

@@ -4,6 +4,10 @@ on:
push:
branches:
- main
workflow_dispatch:
permissions:
packages: write
jobs:
build:
@@ -39,7 +43,14 @@ jobs:
with:
driver-opts: 'image=moby/buildkit:v0.11.6'
- name: Login
- name: Login Public
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login Private
uses: docker/login-action@v3
with:
registry: ${{ secrets.DOCKER_REGISTRY }}
@@ -50,9 +61,15 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ secrets.DOCKER_IMAGE }}
# generate Docker tags based on the following events/attributes
tags: type=sha
images: |
ghcr.io/zitadel/login
${{ secrets.DOCKER_IMAGE }}
tags: |
type=edge
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
type=sha
- name: Install dependencies
run: pnpm install
@@ -69,8 +86,22 @@ jobs:
timeout-minutes: 10
with:
context: .
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
push: true
- name: Export digest
run: |
mkdir -p /tmp/digests/app
digest="${{ steps.build.outputs.digest }}"
touch "/tmp/digests/app/${digest#sha256:}"
- name: Upload digest
uses: actions/upload-artifact@v4
with:
name: digests
path: /tmp/digests
if-no-files-found: error
retention-days: 1

View File

@@ -14,7 +14,7 @@
],
"sideEffects": false,
"scripts": {
"generate": "buf generate https://github.com/zitadel/zitadel.git#ref=02617cf17fdde849378c1a6b5254bbfb2745b164 --path ./proto/zitadel",
"generate": "buf generate https://github.com/zitadel/zitadel.git --path ./proto/zitadel",
"clean": "rm -rf zitadel .turbo node_modules google protoc-gen-openapiv2 validate"
},
"dependencies": {