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 name: Build image
on: on:
pull_request: push:
tags:
- 'v*'
jobs: jobs:
build-image: build-image:
runs-on: node-22-bullseye
container: container:
image: catthehacker/ubuntu:act-latest
env: env:
USER: node USER: node
NIX_CONFIG: experimental-features = nix-command flakes NIX_CONFIG: experimental-features = nix-command flakes
@ -20,7 +22,19 @@ jobs:
fi fi
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v4 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: | - run: |
. ~/.nix-profile/etc/profile.d/nix.sh . ~/.nix-profile/etc/profile.d/nix.sh
nix build --log-format raw --print-build-logs .#image -o image.tar.gz 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)