From 4cf681ce5713be1db86ca7066ea38ba9cfe93d48 Mon Sep 17 00:00:00 2001 From: Nikolaos Karaolidis Date: Sun, 14 Sep 2025 15:54:59 +0100 Subject: [PATCH] Add builder workflow Signed-off-by: Nikolaos Karaolidis --- builder.yaml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 builder.yaml diff --git a/builder.yaml b/builder.yaml new file mode 100644 index 0000000..0407bff --- /dev/null +++ b/builder.yaml @@ -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 }}