From 47d6a58b18714f110ef79f11abf33bcf93341555 Mon Sep 17 00:00:00 2001 From: xengi Date: Wed, 5 Aug 2026 15:46:38 +0200 Subject: [PATCH] Add .forgejo/workflows/container.yaml Signed-off-by: xengi --- .forgejo/workflows/container.yaml | 38 +++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .forgejo/workflows/container.yaml diff --git a/.forgejo/workflows/container.yaml b/.forgejo/workflows/container.yaml new file mode 100644 index 0000000..a6c438e --- /dev/null +++ b/.forgejo/workflows/container.yaml @@ -0,0 +1,38 @@ +name: Build archlinux-aur container + +on: + push: + schedule: + - cron: '0 12 * * *' + timezone: Europe/Berlin + workflow_dispatch: + +enable-email-notifications: true + +env: + BUILDKITD_FLAGS: --oci-worker-no-process-sandbox + REGISTRY_URL: coderberg.org + REGISTRY_IMAGE: ${{ env.REGISTRY_URL }}/${{ env.FORGEJO_REPOSITORY }}/archlinux-aur + REGISTRY_TAG: latest + +jobs: + build: + runs-on: buildkit + name: Build archlinux-aur container + steps: + - name: Check out the repository + run: git clone ${{ env.FORGEJO_SERVER_URL }}/${{ env.FORGEJO_REPOSITORY }} . + - name: Setup buildkit + run: | + mkdir -p ~/.docker + echo "{\"auths\":{\"${{ env.REGISTRY_URL }}\":{\"username\":\"${{ env.FORGEJO_REPOSITORY_OWNER }}\",\"password\":\"${{ env.FORGEJO_TOKEN }}\"}}}" > ~/.docker/config.json + - name: Build container + run: | + export CREATED=$(date -Iseconds) + sed -i "s/%%CREATED%%/$CREATED/" docker/Dockerfile + sed -i "s/%%COMMIT%%/$CI_BUILD_REF_NAME/" docker/Dockerfile + buildctl-daemonless.sh build \ + --frontend dockerfile.v0 \ + --local context=docker/ \ + --local dockerfile=docker/ \ + --output type=image,name=${{ env.REGISTRY_IMAGE }}:${{ env.REGISTRY_TAG }},push=true