builder/.forgejo/workflows/build.yaml
Hornwitser a40f808543
Some checks failed
/ build (push) Failing after 26s
Add bash dependency
2025-05-16 19:17:06 +02:00

33 lines
1.1 KiB
YAML

on: [push]
env:
REGISTRY: forge.hornwitser.no
REGISTRY_IMAGE: forge.hornwitser.no/furnavia/builder:${{ github.ref_name }}
jobs:
build:
runs-on: alpine
steps:
-
name: Install dependencies
shell: sh
run: |
apk add bash buildah git
-
name: Checkout repository
shell: sh
run: |
git config --global credential.helper store
echo "https://runner:${{ secrets.GITHUB_TOKEN }}@$(echo "${{ github.server_url }}" | cut -b 9-)" > ~/.git-credentials
git clone --branch ${{ github.ref_name }} ${{ github.server_url }}/${{ github.repository }} ${{ github.workspace }}
-
name: Authenticate with registry
shell: sh
run: |
echo "${{ secrets.REGISTRY_TOKEN }}" | buildah login ${{ env.REGISTRY }} --username runner --password-stdin
-
name: Build and push
shell: sh
run: |
id
${{ github.workspace }}/builder.sh ${{ env.REGISTRY_IMAGE }}
buildah push ${{ env.REGISTRY_IMAGE }}