Fix build workflow
Some checks failed
Build / build (push) Has been cancelled

This commit is contained in:
Moritz Ruth 2025-02-28 22:07:20 +01:00
parent 7f8f7c8020
commit 2b7aa4c0dd
Signed by: moritzruth
GPG key ID: C9BBAB79405EE56D

View file

@ -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 }}"
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 }}