40 lines
991 B
YAML
40 lines
991 B
YAML
name: Build OCI image
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "**"
|
|
|
|
env:
|
|
REGISTRY: ghcr.io
|
|
IMAGE_NAME: ${{ github.repository }}
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
packages: write
|
|
contents: read
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
- 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 }}
|