From bd3ca1660ae0dd33fc80bfd5d0a33d95c83486b0 Mon Sep 17 00:00:00 2001 From: Ciapa Date: Fri, 12 Apr 2024 12:50:05 +0200 Subject: [PATCH] Provide very basic woodpecker integration --- .woodpecker/deploy.yaml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .woodpecker/deploy.yaml diff --git a/.woodpecker/deploy.yaml b/.woodpecker/deploy.yaml new file mode 100644 index 0000000..c0626f9 --- /dev/null +++ b/.woodpecker/deploy.yaml @@ -0,0 +1,34 @@ +labels: + hostname: "nixos-x86-64" + +variables: + NIXOS_VERSION: "unstable" + NIXPKGS_ALLOW_UNFREE: "1" + NIXPKGS_ALLOW_INSECURE: "1" + +steps: + - name: Configure Nix Channels + image: bash + commands: + - nix-channel --add https://nixos.org/channels/nixos-${NIXOS_VERSION} nixos + - nix-channel --update + when: + - evaluate: 'CI_PIPELINE_EVENT != "cron" && CI_PIPELINE_EVENT != "schedule"' + + - name: Check Flake + image: bash + commands: + - nix flake check + when: + - evaluate: 'CI_PIPELINE_EVENT != "cron" && CI_PIPELINE_EVENT != "schedule"' + + - name: Deploy + image: bash + commands: + - eval "$(ssh-agent -s)" + - chmod 0600 $SSH_PRIVATE_KEY + - ssh-add $SSH_PRIVATE_KEY + - nix develop --command deploy + when: + - evaluate: 'CI_PIPELINE_EVENT != "cron" && CI_COMMIT_BRANCH == "master"' +