fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Nix CI tryouts

This commit is contained in:
Paul Brinkmeier 2025-10-06 01:30:31 +02:00
parent 0c5bf1e858
commit 8c128c572e

View File

@ -1,10 +1,12 @@
name: Build image
on:
pull_request:
push:
tags:
- 'v*'
jobs:
build-image:
runs-on: node-22-bullseye
container:
image: catthehacker/ubuntu:act-latest
env:
USER: node
NIX_CONFIG: experimental-features = nix-command flakes
@ -20,7 +22,19 @@ jobs:
fi
- name: Checkout repo
uses: actions/checkout@v4
- name: Get image meta
run: |
. ~/.nix-profile/etc/profile.d/nix.sh
nix build .#image-meta -o image-meta
- name: Version check
run: |
VERSION=$(cat image-meta/version)
[ "$GITHUB_REF_NAME" = v"$VERSION" ]
- run: |
. ~/.nix-profile/etc/profile.d/nix.sh
nix build --log-format raw --print-build-logs .#image -o image.tar.gz
- run: ls -lah
- run: docker login -u paul -p "$PASSWORD" git.pbrinkmeier.de
env:
PASSWORD: "${{ secrets.REGISTRY_PASSWORD }}"
- run: docker load < image.tar.gz
- run: docker image push $(cat image-meta/name)