mirror of
https://github.com/goauthentik/authentik
synced 2026-04-26 01:25:02 +02:00
* root: update client-go generation (cherry-pick #19762 to version-2025.12) (#19791) Co-authored-by: Marc 'risson' Schmitt <marc.schmitt@risson.space> Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space> * ci: always generate API clients (#19906) * ci: always generate API clients Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix missing respective actions Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix flaky test Signed-off-by: Jens Langhammer <jens@goauthentik.io> * mount generated client Signed-off-by: Jens Langhammer <jens@goauthentik.io> * sigh Signed-off-by: Jens Langhammer <jens@goauthentik.io> --------- Signed-off-by: Jens Langhammer <jens@goauthentik.io> * ci: fix test_docker.sh Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space> * bump go Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix dind Signed-off-by: Jens Langhammer <jens@goauthentik.io> --------- Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space> Signed-off-by: Jens Langhammer <jens@goauthentik.io> Co-authored-by: authentik-automation[bot] <135050075+authentik-automation[bot]@users.noreply.github.com> Co-authored-by: Jens L. <jens@goauthentik.io>
106 lines
3.3 KiB
YAML
106 lines
3.3 KiB
YAML
---
|
|
# Re-usable workflow for a single-architecture build
|
|
name: Reusable - Single-arch Container build
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
image_name:
|
|
required: true
|
|
type: string
|
|
image_arch:
|
|
required: true
|
|
type: string
|
|
runs-on:
|
|
required: true
|
|
type: string
|
|
registry_dockerhub:
|
|
default: false
|
|
type: boolean
|
|
registry_ghcr:
|
|
default: false
|
|
type: boolean
|
|
release:
|
|
default: false
|
|
type: boolean
|
|
outputs:
|
|
image-digest:
|
|
value: ${{ jobs.build.outputs.image-digest }}
|
|
|
|
jobs:
|
|
build:
|
|
name: Build ${{ inputs.image_arch }}
|
|
runs-on: ${{ inputs.runs-on }}
|
|
outputs:
|
|
image-digest: ${{ steps.push.outputs.digest }}
|
|
permissions:
|
|
# Needed to upload container images to ghcr.io
|
|
packages: write
|
|
# Needed for attestation
|
|
id-token: write
|
|
attestations: write
|
|
# Needed for checkout
|
|
contents: read
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- uses: docker/setup-qemu-action@v3.6.0
|
|
- uses: docker/setup-buildx-action@v3
|
|
- name: prepare variables
|
|
uses: ./.github/actions/docker-push-variables
|
|
id: ev
|
|
env:
|
|
DOCKER_USERNAME: ${{ secrets.DOCKER_CORP_USERNAME }}
|
|
with:
|
|
image-name: ${{ inputs.image_name }}
|
|
image-arch: ${{ inputs.image_arch }}
|
|
release: ${{ inputs.release }}
|
|
- name: Login to Docker Hub
|
|
if: ${{ inputs.registry_dockerhub }}
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ secrets.DOCKER_CORP_USERNAME }}
|
|
password: ${{ secrets.DOCKER_CORP_PASSWORD }}
|
|
- name: Login to GitHub Container Registry
|
|
if: ${{ inputs.registry_ghcr }}
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.repository_owner }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Setup node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version-file: web/package.json
|
|
cache: "npm"
|
|
cache-dependency-path: web/package-lock.json
|
|
- name: Setup go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: "go.mod"
|
|
- name: Generate API Clients
|
|
run: |
|
|
make gen-client-ts
|
|
make gen-client-go
|
|
- name: Build Docker Image
|
|
uses: docker/build-push-action@v6
|
|
id: push
|
|
with:
|
|
context: .
|
|
push: ${{ steps.ev.outputs.shouldPush == 'true' }}
|
|
secrets: |
|
|
GEOIPUPDATE_ACCOUNT_ID=${{ secrets.GEOIPUPDATE_ACCOUNT_ID }}
|
|
GEOIPUPDATE_LICENSE_KEY=${{ secrets.GEOIPUPDATE_LICENSE_KEY }}
|
|
build-args: |
|
|
${{ steps.ev.outputs.imageBuildArgs }}
|
|
tags: ${{ steps.ev.outputs.imageTags }}
|
|
platforms: linux/${{ inputs.image_arch }}
|
|
cache-from: type=registry,ref=${{ steps.ev.outputs.attestImageNames }}:buildcache-${{ inputs.image_arch }}
|
|
cache-to: ${{ steps.ev.outputs.cacheTo }}
|
|
- uses: actions/attest-build-provenance@v2
|
|
id: attest
|
|
if: ${{ steps.ev.outputs.shouldPush == 'true' }}
|
|
with:
|
|
subject-name: ${{ steps.ev.outputs.attestImageNames }}
|
|
subject-digest: ${{ steps.push.outputs.digest }}
|
|
push-to-registry: true
|