Add builder workflow
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
39
builder.yaml
Normal file
39
builder.yaml
Normal 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 -u "${{ 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 }}
|
Reference in New Issue
Block a user