CI #1

Merged
paul merged 5 commits from ci into main 2025-10-07 01:17:45 +02:00
3 changed files with 37 additions and 4 deletions
Showing only changes of commit 1ccde9e5fc - Show all commits

View File

@ -0,0 +1,27 @@
name: build
on:
pull_request:
jobs:
build:
container:
image: node:24-bookworm
env:
USER: node
HOME: /home/node
NIX_CONFIG: experimental-features = nix-command flakes
volumes:
- /var/lib/pbri/docker/nix_runner_nix:/nix
- /var/lib/pbri/docker/nix_runner_etc:/etc/nix
- /var/lib/pbri/docker/nix_runner_home_node:/home/node
options: --user 1000:1000
steps:
- name: Prep nix env
run: |
if [ ! -f ~/.nix-profile/etc/profile.d/nix.sh ]; then
curl -L https://nixos.org/nix/install | bash -s -- --no-daemon
fi
. ~/.nix-profile/etc/profile.d/nix.sh
env >> "$GITHUB_ENV"
- name: Checkout repo
uses: actions/checkout@v4
- run: nix build --log-format raw --print-build-logs .#yore

View File

@ -25,7 +25,7 @@ You can also use it to run a database for development by choosing a `$COMMAND` t
``` ```
BASE_DIR=./pgdata scripts/with-db psql "dbname=yore-test port=5433 user=yore-test" BASE_DIR=./pgdata scripts/with-db psql "dbname=yore-test port=5433 user=yore-test"
# cabal repl with env vars set # cabal repl with env vars set
BASE_DIR=./pgdata scripts/with-db scripts/dev BASE_DIR=./pgdata scripts/with-db cabal run
``` ```
By setting `$BASE_DIR` you can persist the database for later runs. By setting `$BASE_DIR` you can persist the database for later runs.

View File

@ -60,15 +60,21 @@
]; ];
in { in {
packages = rec { packages = rec {
docker = default = yore;
inherit yore;
yore-meta = pkgs.runCommand "yore-meta" {} ''
mkdir -p $out
echo -n ${yore.version} > $out/version
echo -n git.pbrinkmeier.de/paul/yore:${yore.version} > $out/image-tag
'';
image =
pkgs.dockerTools.buildImage { pkgs.dockerTools.buildImage {
name = "git.pbrinkmeier.de/paul/yore"; name = "git.pbrinkmeier.de/paul/yore";
tag = yore.version; tag = yore.version;
config.Cmd = [ "${yore}/bin/yore" ]; config.Cmd = [ "${yore}/bin/yore" ];
}; };
default = yore;
opium_ = opium.packages.${system}.opium; opium_ = opium.packages.${system}.opium;
}; };