builder/.forgejo/workflows/build.yaml
Hornwitser 3ee3ac90b4
Some checks failed
/ build (push) Failing after 53s
debug
2025-05-17 22:46:46 +02:00

43 lines
1.5 KiB
YAML

on: [push]
env:
REGISTRY: forge.hornwitser.no
REGISTRY_IMAGE: forge.hornwitser.no/hornwitser/builder:${{ github.ref_name }}
jobs:
build:
runs-on: debian
steps:
-
name: Install and configure dependencies
run: |
apt-get update
apt-get install -y --no-install-recommends \
buildah \
ca-certificates \
containers-storage \
fuse-overlayfs \
git \
netavark \
strace \
;
sed /usr/share/containers/storage.conf \
-e '/^#\?mount_program/c\
mount_program = "/usr/bin/fuse-overlayfs"' \
> /etc/containers/storage.conf
-
name: Checkout repository
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
run: |
echo "${{ secrets.REGISTRY_TOKEN }}" | buildah login ${{ env.REGISTRY }} --username runner --password-stdin
-
name: Build and push
run: |
export BUILDAH_ISOLATION=chroot
export _BUILDAH_STARTED_IN_USERNS=""
${{ github.workspace }}/builder.sh ${{ env.REGISTRY_IMAGE }}
buildah push ${{ env.REGISTRY_IMAGE }}