Add builder workflow

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2025-09-14 15:54:59 +01:00
parent f3162e1620
commit 4cf681ce57

39
builder.yaml Normal file
View File

@@ -0,0 +1,39 @@
name: Build Builder Image
on:
workflow_call:
inputs:
image:
description: "Full image name to build and push"
required: true
type: string
secrets:
registry_user:
required: true
registry_password:
required: true
jobs:
builder:
runs-on: nix
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Log In to Registry
run: |
buildah login --username "${{ secrets.registry_user }}" --password "${{ secrets.registry_password }}" "$(echo "${{ inputs.image }}" | cut -d/ -f1)"
- name: Pull Builder Cache
run: |
buildah pull ${{ inputs.image }} || true
- name: Build Builder Image
run: |
buildah build --layers -f .gitea/Containerfile -t ${{ inputs.image }} .
- name: Push Builder Image
run: |
skopeo copy containers-storage:${{ inputs.image }} docker://${{ inputs.image }}