mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-01 15:53:42 +00:00
# Which Problems Are Solved Building the login container in the pipeline without build layer caches takes about 20 minutes. # How the Problems Are Solved We use cache-from and cache-to arguments to use the GitHub cache API. Compare 1st and 2nd run [of this PRs pipeline](https://github.com/zitadel/zitadel/actions/runs/16590808510/job/46927893304) # Additional Context - Follows up on #10343
70 lines
2.0 KiB
YAML
70 lines
2.0 KiB
YAML
name: Login Container
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
login_build_image_name:
|
|
description: 'The image repository name of the standalone login image'
|
|
type: string
|
|
required: true
|
|
node_version:
|
|
required: true
|
|
type: string
|
|
outputs:
|
|
login_build_image:
|
|
description: 'The full image tag of the standalone login image'
|
|
value: '${{ inputs.login_build_image_name }}:${{ github.sha }}'
|
|
|
|
permissions:
|
|
packages: write
|
|
|
|
env:
|
|
default_labels: |
|
|
org.opencontainers.image.documentation=https://zitadel.com/docs
|
|
org.opencontainers.image.vendor=CAOS AG
|
|
org.opencontainers.image.licenses=MIT
|
|
|
|
jobs:
|
|
login-container:
|
|
name: Build Login Container
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
packages: write
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Login meta
|
|
id: login-meta
|
|
uses: docker/metadata-action@v5
|
|
with:
|
|
images: ${{ inputs.login_build_image_name }}
|
|
labels: ${{ env.default_labels}}
|
|
annotations: |
|
|
manifest:org.opencontainers.image.licenses=MIT
|
|
tags: |
|
|
type=sha,prefix=,suffix=,format=long
|
|
- name: Login to Docker registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
- name: Bake login multi-arch
|
|
uses: docker/bake-action@v6
|
|
env:
|
|
NODE_VERSION: ${{ inputs.node_version }}
|
|
with:
|
|
push: true
|
|
provenance: true
|
|
sbom: true
|
|
targets: login-standalone
|
|
set: |
|
|
*.cache-from=type=gha
|
|
*.cache-to=type=gha,mode=max
|
|
files: |
|
|
./apps/login/docker-bake.hcl
|
|
./apps/login/docker-bake-release.hcl
|
|
./docker-bake.hcl
|
|
cwd://${{ steps.login-meta.outputs.bake-file }}
|