38 lines
988 B
YAML
38 lines
988 B
YAML
on: [push]
|
|
env:
|
|
REGISTRY: forge.hornwitser.no
|
|
REGISTRY_IMAGE: forge.hornwitser.no/furnavia/builder
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: alpine
|
|
steps:
|
|
-
|
|
name: Install buildah
|
|
run: |
|
|
apk add buildah
|
|
-
|
|
name: Compute image tags
|
|
id: info
|
|
shell: bash
|
|
run: |
|
|
tee -a ${GITHUB_OUTPUT} <<EOF
|
|
TAGS=${{ env.REGISTRY_IMAGE }}:${{ github.ref_name }}
|
|
EOF
|
|
-
|
|
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
|
|
-
|
|
name: Push
|
|
with:
|
|
push: true
|
|
tags: ${{ steps.info.outputs.TAGS }}
|