From 8498740589e2fc3107e1dd229a96b96f15997100 Mon Sep 17 00:00:00 2001 From: patrick Date: Sat, 26 Aug 2023 12:58:49 +0000 Subject: [PATCH] Work around for conditional execution in Woodpecker (#3) Co-authored-by: Smaug123 Reviewed-on: https://gitea.patrickstevens.co.uk/patrick/raft-fable/pulls/3 --- .woodpecker/.build.yml | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/.woodpecker/.build.yml b/.woodpecker/.build.yml index 73f2551..7cc894c 100644 --- a/.woodpecker/.build.yml +++ b/.woodpecker/.build.yml @@ -1,16 +1,18 @@ steps: - build: - image: nixos/nix - commands: - - echo 'experimental-features = flakes nix-command' >> /etc/nix/nix.conf - # Lint - - "nix develop --command bash -c 'dotnet tool restore && ./hooks/pre-push'" - # Test - - nix develop --command dotnet -- test - - nix develop --command dotnet -- test --configuration Release - # Perform build - - "pushd RaftFable && nix develop --command npm -- install && popd" - - "pushd RaftFable && nix develop --command npm -- run-script build && popd" + build: + image: nixos/nix + commands: + - echo 'experimental-features = flakes nix-command' >> /etc/nix/nix.conf + # Lint + - "nix develop --command bash -c 'dotnet tool restore && ./hooks/pre-push'" + # Test + - nix develop --command dotnet -- test + - nix develop --command dotnet -- test --configuration Release + # Perform build + - "pushd RaftFable && nix develop --command npm -- install && popd" + - "pushd RaftFable && nix develop --command npm -- run-script build && popd" -when: - evaluate: '(CI_PIPELINE_EVENT == "push" && CI_COMMIT_BRANCH == CI_REPO_DEFAULT_BRANCH) || (CI_PIPELINE_EVENT == "pull_request")' + when: + - event: "push" + evaluate: 'CI_COMMIT_BRANCH == CI_REPO_DEFAULT_BRANCH' + - event: "pull_request"