Add Gitea Actions config
All checks were successful
build / build (pull_request) Successful in 5m40s

This commit is contained in:
Paul Brinkmeier 2025-10-07 00:26:30 +02:00
parent 999c9e8c9e
commit 1ccde9e5fc
3 changed files with 37 additions and 4 deletions

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"
# 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.

View File

@ -60,15 +60,21 @@
];
in {
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 {
name = "git.pbrinkmeier.de/paul/yore";
tag = yore.version;
config.Cmd = [ "${yore}/bin/yore" ];
};
default = yore;
opium_ = opium.packages.${system}.opium;
};