Work around for conditional execution in Woodpecker #3

Merged
patrick merged 2 commits from woodpecker into main 2023-08-26 12:58:50 +00:00

View File

@@ -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"