Add Gitea Actions config
All checks were successful
build / build (pull_request) Successful in 5m40s
All checks were successful
build / build (pull_request) Successful in 5m40s
This commit is contained in:
parent
999c9e8c9e
commit
1ccde9e5fc
27
.gitea/workflows/build.yml
Normal file
27
.gitea/workflows/build.yml
Normal 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
|
||||
@ -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.
|
||||
|
||||
12
flake.nix
12
flake.nix
@ -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;
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user