mirror of
https://github.com/andwati/zitadel.git
synced 2026-10-18 13:52:51 +00:00
# Which Problems Are Solved Action runs on PRs from forks can't authenticate at depot. # How the Problems Are Solved - The GitHub secret DEPOT_TOKEN is statically passed as env variable to the steps that use the depot CLI, as described [here](https://github.com/depot/setup-action#authentication). - Removed the oidc argument from the depot/setup-action, as we pass the env statically to the relevant steps. - The `id-token: write` permission is removed from all workflows, as it's not needed anymore. # Additional Changes Removed the obsolete comment ```yaml # latest if branch is main, otherwise image version which is the pull request number ``` # Additional Context Required by these approved PRs so their checks can be executed: - https://github.com/zitadel/zitadel/pull/9982 - https://github.com/zitadel/zitadel/pull/9958
72 lines
2.0 KiB
YAML
72 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 }}'
|
|
secrets:
|
|
DEPOT_TOKEN:
|
|
required: true
|
|
|
|
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: depot-ubuntu-22.04-8
|
|
permissions:
|
|
packages: write
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: depot/setup-action@v1
|
|
- 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: Bake login multi-arch
|
|
uses: depot/bake-action@v1
|
|
env:
|
|
DEPOT_TOKEN: ${{ secrets.DEPOT_TOKEN }}
|
|
NODE_VERSION: ${{ inputs.node_version }}
|
|
with:
|
|
push: true
|
|
provenance: true
|
|
sbom: true
|
|
targets: login-standalone
|
|
set: login-*.context=./login/
|
|
project: w47wkxzdtw
|
|
files: |
|
|
./login/docker-bake.hcl
|
|
./login/docker-bake-release.hcl
|
|
./docker-bake.hcl
|
|
cwd://${{ steps.login-meta.outputs.bake-file }}
|