builder/.forgejo/workflows/build.yaml

39 lines
988 B
YAML
Raw Normal View History

2024-07-15 22:05:19 +02:00
on: [push]
env:
2025-05-16 17:42:27 +02:00
REGISTRY: forge.hornwitser.no
REGISTRY_IMAGE: forge.hornwitser.no/furnavia/builder
2024-07-15 22:05:19 +02:00
jobs:
build:
2025-05-16 17:42:27 +02:00
runs-on: alpine
2024-07-15 22:05:19 +02:00
steps:
-
2025-05-16 17:42:27 +02:00
name: Install buildah
run: |
2025-05-16 17:42:27 +02:00
apk add buildah
2024-07-20 18:53:37 +02:00
-
2025-05-16 17:42:27 +02:00
name: Compute image tags
2024-07-20 18:53:37 +02:00
id: info
shell: bash
run: |
tee -a ${GITHUB_OUTPUT} <<EOF
2025-05-16 17:42:27 +02:00
TAGS=${{ env.REGISTRY_IMAGE }}:${{ github.ref_name }}
2024-07-20 18:53:37 +02:00
EOF
2024-07-15 22:05:19 +02:00
-
2025-05-16 17:42:27 +02:00
name: Checkout
uses: actions/checkout@v4
-
name: Build
run: |
id
$GITHUB_WORKSPACE/builder.sh ${{ steps.info.outputs.TAGS }}
-
name: Authenticate with registry
run: |
echo "${{ secrets.REGISTRY_TOKEN }}" | buildah login ${{ env.REGISTRY }} --username "${{ secrets.REGISTRY_USERNAME }}" --password-stdin
2024-07-15 22:05:19 +02:00
-
2025-05-16 17:42:27 +02:00
name: Push
2024-07-15 22:05:19 +02:00
with:
push: true
2024-07-20 18:53:37 +02:00
tags: ${{ steps.info.outputs.TAGS }}