Skip to content

release

release #3

Workflow file for this run

---
name: release
on:
release:
types:
- published
- created
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- uses: docker/[email protected]
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- id: ev
run: |
echo "sha=${GITHUB_SHA}" > "${GITHUB_OUTPUT}"
echo "version=${GITHUB_REF#refs/tags/version/}" > "${GITHUB_OUTPUT}"
- uses: docker/build-push-action@v5
with:
context: .
push: "${{ github.ref == 'refs/heads/main' }}"
tags: |
ghcr.io/authentik-community/krb5:${{ steps.ev.outputs.sha }}
ghcr.io/authentik-community/krb5:${{ steps.ev.outputs.version }}
ghcr.io/authentik-community/krb5:latest
platforms: linux/amd64,linux/arm64
build-args: |
GIT_BUILD_HASH=${{ steps.ev.outputs.sha }}
VERSION=${{ steps.ev.outputs.version }}
cache-from: type=gha
cache-to: type=gha,mode=max