feat(oci): Use Buildah
And set version the right way...
This commit is contained in:
40
.github/workflows/build-oci.yaml
vendored
40
.github/workflows/build-oci.yaml
vendored
@@ -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}}
|
||||
|
Reference in New Issue
Block a user