From c06bf471cc313260bd7aa04cbd9b268dde770a9b Mon Sep 17 00:00:00 2001 From: Daniel Lundin Date: Thu, 12 Sep 2024 22:44:44 +0200 Subject: [PATCH] Add initial CI job --- .woodpecker/ci.yaml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .woodpecker/ci.yaml diff --git a/.woodpecker/ci.yaml b/.woodpecker/ci.yaml new file mode 100644 index 0000000..5fdfe80 --- /dev/null +++ b/.woodpecker/ci.yaml @@ -0,0 +1,33 @@ +when: + - event: pull_request + - event: push + branch: + - ${CI_REPO_DEFAULT_BRANCH} + +steps: + check: + image: alpine + volumes: + - nix:/nix + commands: + # install nix + - | + test -f /nix/installer || wget -O /nix/installer https://github.com/DeterminateSystems/nix-installer/releases/download/v0.18.0/nix-installer-x86_64-linux + chmod +x /nix/installer + rm -f /nix/receipt.json /nix/nix-installer + /nix/installer install linux --init=none --no-confirm + . /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh + + # configure nix + - | + mkdir -p /etc/nix + cat < /etc/nix/nix.conf + sandbox = false + experimental-features = nix-command flakes + EOF + + # build + - nix build .#patos_image + + # check + - nix flake check