4 Commits
Author SHA1 Message Date
Paul Brinkmeier da8e8f15c8 Reset version 2025-10-07 00:11:59 +02:00
Paul Brinkmeier 54099afcb1 Use new bind mounts
Build image / build-image (push) Successful in 1m22s
2025-10-07 00:09:32 +02:00
Paul Brinkmeier 959630f7b6 Change version back to 0.0.10 and remove docker group 2025-10-06 09:44:52 +02:00
paul 96dc4c924d Nix CI tryouts
Build image / build-image (push) Successful in 24s
2025-10-06 03:26:14 +02:00
2 changed files with 29 additions and 17 deletions
+14 -15
View File
@@ -6,36 +6,35 @@ on:
jobs: jobs:
build-image: build-image:
container: container:
image: catthehacker/ubuntu:act-latest image: node:24-bookworm
env: env:
USER: node USER: node
HOME: /home/node
NIX_CONFIG: experimental-features = nix-command flakes NIX_CONFIG: experimental-features = nix-command flakes
volumes: volumes:
- /home/paul/nix-ci/nix-runner-nix:/nix - /var/lib/pbri/docker/nix_runner_nix:/nix
- /home/paul/nix-ci/nix-runner-etc-nix:/etc/nix - /var/lib/pbri/docker/nix_runner_etc:/etc/nix
- /home/paul/nix-ci/nix-runner-home-node:/home/node - /var/lib/pbri/docker/nix_runner_home_node:/home/node
options: --user 1000:1000 options: --user 1000:1000
steps: steps:
- run: | - name: Prep nix env
cat /var/run/act/workflow/0.sh run: |
if [ ! -f ~/.nix-profile/etc/profile.d/nix.sh ]; then if [ ! -f ~/.nix-profile/etc/profile.d/nix.sh ]; then
curl -L https://nixos.org/nix/install | bash -s -- --no-daemon curl -L https://nixos.org/nix/install | bash -s -- --no-daemon
fi fi
. ~/.nix-profile/etc/profile.d/nix.sh
env >> "$GITHUB_ENV"
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Get image meta - name: Get image meta
run: | run: nix build .#image-meta -o image-meta
. ~/.nix-profile/etc/profile.d/nix.sh
nix build .#image-meta -o image-meta
- name: Version check - name: Version check
run: | run: |
VERSION=$(cat image-meta/version) VERSION=$(cat image-meta/version)
[ "$GITHUB_REF_NAME" = v"$VERSION" ] [ "$GITHUB_REF_NAME" = v"$VERSION" ]
- run: | - run: nix build --log-format raw --print-build-logs .#image -o image.tar.gz
. ~/.nix-profile/etc/profile.d/nix.sh - run: gunzip -c image.tar.gz > image.tar
nix build --log-format raw --print-build-logs .#image -o image.tar.gz - run: nix run .#crane -- auth login git.pbrinkmeier.de -u paul -p "$PASSWORD"
- run: docker login -u paul -p "$PASSWORD" git.pbrinkmeier.de
env: env:
PASSWORD: "${{ secrets.REGISTRY_PASSWORD }}" PASSWORD: "${{ secrets.REGISTRY_PASSWORD }}"
- run: docker load < image.tar.gz - run: nix run .#crane -- push image.tar $(cat image-meta/name)
- run: docker image push $(cat image-meta/name)
+15 -2
View File
@@ -23,8 +23,15 @@
# Also, flake.nix, flake.lock and .gitea are not included to avoid annoying rebuilds when # Also, flake.nix, flake.lock and .gitea are not included to avoid annoying rebuilds when
# working on them. # working on them.
src = pkgs.lib.cleanSourceWith { src = pkgs.lib.cleanSourceWith {
src = gitignore.lib.gitignoreSource ./.; src = ./.;
filter = path: type: builtins.baseNameOf path != "flake.nix" && builtins.baseNameOf path != "flake.lock" && builtins.match "^\\.gitea.*" path != null; filter = gitignore.lib.gitignoreFilterWith {
basePath = ./.;
extraRules = ''
flake.nix
flake.lock
.gitea
'';
};
}; };
# Avoid linking against libc # Avoid linking against libc
@@ -55,6 +62,12 @@
config.Cmd = [ "${vrnp-static}/bin/vrnp" ]; config.Cmd = [ "${vrnp-static}/bin/vrnp" ];
}; };
}; };
apps = {
crane = {
type = "app";
program = "${pkgs.crane}/bin/crane";
};
};
} }
); );
} }