From 2b7aa4c0ddc956d6e69cf625268ef88ca88e5a1e Mon Sep 17 00:00:00 2001 From: Moritz Ruth Date: Fri, 28 Feb 2025 22:07:20 +0100 Subject: [PATCH] Fix build workflow --- .forgejo/workflows/build.yaml | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/.forgejo/workflows/build.yaml b/.forgejo/workflows/build.yaml index 7e5c1aa..6298733 100644 --- a/.forgejo/workflows/build.yaml +++ b/.forgejo/workflows/build.yaml @@ -8,25 +8,30 @@ on: jobs: build: - runs-on: "docker" + runs-on: "docker://code.forgejo.org/oci/alpine:3.21" steps: - name: "Checkout" uses: "https://code.forgejo.org/actions/checkout@v4" - - name: "Setup Docker" - uses: "https://github.com/docker/setup-docker-action@v4" + - name: "Install Podman and Buildah" + run: "apk add podman buildah" - - name: "Login to the container registry" - uses: "https://github.com/docker/login-action@v3" - with: - registry: git.moritzruth.de - username: ${{ github.actor }} - password: ${{ github.token }} - - - name: "Build and push" - uses: "https://github.com/docker/build-push-action@v6" + - name: "Build the container image" + id: "build-image" + uses: "https://github.com/redhat-actions/buildah-build@v2" with: file: "Containerfile" push: true - tags: "git.moritzruth.de/moritzruth/sscdc:${{ github.ref_name }}" \ No newline at end of file + image: "git.moritzruth.de/moritzruth/sscdc" + tags: "${{ github.ref_name }}" + containerfiles: "./Containerfile" + + - name: "Push the container image to the registry" + uses: "https://github.com/redhat-actions/push-to-registry@v2" + with: + image: ${{ steps.build-image.outputs.image }} + tags: ${{ steps.build-image.outputs.tags }} + registry: git.moritzruth.de + username: ${{ github.actor }} + password: ${{ github.token }} \ No newline at end of file