feat(oci): Use Buildah

And set version the right way...
This commit is contained in:
2025-08-04 16:12:16 +02:00
parent b13e922966
commit 90eda75219
2 changed files with 35 additions and 22 deletions

View File

@@ -1,9 +1,9 @@
name: Build OCI image
on:
release:
types:
- published
push:
tags:
- "**"
env:
REGISTRY: ghcr.io
@@ -12,26 +12,28 @@ env:
jobs:
build:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
- name: Build image
id: build-image
uses: redhat-actions/buildah-build@v2
with:
image: ghcr.io/katenary/katenary
tags: latest ${{ github.ref_name }}
containerfiles: |
./oci/katenary/Containerfile
build-args: |
VERSION=${{ github.ref_name }}
- name: Push image
id: push-to-quay
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-image.outputs.image }}
tags: ${{ steps.build-image.outputs.tags }}
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
file: ./oci/katenary/Containerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
VERSION=${{github.ref_name}}