From e6331781cb800be4ba0c87b7795199441a966946 Mon Sep 17 00:00:00 2001 From: lilly Date: Thu, 14 May 2026 17:55:54 +0200 Subject: [PATCH] add forgejo actions workflow for container building --- .forgejo/workflows/container.yml | 36 ++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .forgejo/workflows/container.yml diff --git a/.forgejo/workflows/container.yml b/.forgejo/workflows/container.yml new file mode 100644 index 0000000..4c190bb --- /dev/null +++ b/.forgejo/workflows/container.yml @@ -0,0 +1,36 @@ +name: Build Container + +on: + push: {} + +permissions: + packages: write + +jobs: + build-container: + name: Build Container + runs-on: docker + container: + image: ghcr.io/osscontainertools/kaniko:alpine + steps: + - name: Install NodeJS for actions compatibility + run: apk add --no-cache nodejs + - name: Checkout source code + uses: actions/checkout@v6 + - name: Login to container registry (prod only) + if: ${{ forgejo.ref_name == 'main' }} + run: /kaniko/executor login --username="forgejo-actions" --password="${{ forgejo.token }}" + - name: Build Container + env: + KANIKO_NO_PUSH: ${{ forgejo.ref_name != 'main' }} + run: /kaniko/executor + --dockerfile="${{forgejo.workspace }}/Containerfile" + --context="dir://${{ forgejo.workspace }}" + --destination=git.hamburg.ccc.de/ccchh/dooris:latest + --credential-helpers=env + --no-push-cache + --annotation=org.opencontainers.image.ref.name=dooris + --annotation=org.opencontainers.image.url=${{ forgejo.server_url }}/${{ forgejo.repository }} + --annotation=org.opencontainers.image.source=${{ forgejo.server_url }}/${{ forgejo.repository }} + --annotation=org.opencontainers.image.licenses=AGPL-3.0 +