2024-07-15 22:05:19 +02:00
|
|
|
on: [push]
|
|
|
|
env:
|
2025-05-16 17:42:27 +02:00
|
|
|
REGISTRY: forge.hornwitser.no
|
2025-05-16 17:50:14 +02:00
|
|
|
REGISTRY_IMAGE: forge.hornwitser.no/furnavia/builder:${{ github.ref_name }}
|
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:
|
2024-08-02 13:14:43 +02:00
|
|
|
-
|
2025-05-16 17:42:27 +02:00
|
|
|
name: Install buildah
|
2025-05-16 17:51:24 +02:00
|
|
|
shell: sh
|
2024-08-02 13:14:43 +02:00
|
|
|
run: |
|
2025-05-16 17:53:20 +02:00
|
|
|
apk add buildah git
|
2024-07-15 22:05:19 +02:00
|
|
|
-
|
2025-05-16 17:42:27 +02:00
|
|
|
name: Checkout
|
2025-05-16 17:51:24 +02:00
|
|
|
shell: sh
|
2025-05-16 17:42:27 +02:00
|
|
|
uses: actions/checkout@v4
|
|
|
|
-
|
|
|
|
name: Authenticate with registry
|
2025-05-16 17:51:24 +02:00
|
|
|
shell: sh
|
2025-05-16 17:42:27 +02:00
|
|
|
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:50:14 +02:00
|
|
|
name: Build and push
|
2025-05-16 17:51:24 +02:00
|
|
|
shell: sh
|
2025-05-16 17:50:14 +02:00
|
|
|
run: |
|
|
|
|
id
|
|
|
|
$GITHUB_WORKSPACE/builder.sh ${{ env.REGISTRY_IMAGE }}
|
|
|
|
buildah push ${{ env.REGISTRY_IMAGE }}
|