Work around for conditional execution in Woodpecker (#3)
Co-authored-by: Smaug123 <patrick+github@patrickstevens.co.uk> Reviewed-on: #3
This commit is contained in:
@@ -1,16 +1,18 @@
|
|||||||
steps:
|
steps:
|
||||||
build:
|
build:
|
||||||
image: nixos/nix
|
image: nixos/nix
|
||||||
commands:
|
commands:
|
||||||
- echo 'experimental-features = flakes nix-command' >> /etc/nix/nix.conf
|
- echo 'experimental-features = flakes nix-command' >> /etc/nix/nix.conf
|
||||||
# Lint
|
# Lint
|
||||||
- "nix develop --command bash -c 'dotnet tool restore && ./hooks/pre-push'"
|
- "nix develop --command bash -c 'dotnet tool restore && ./hooks/pre-push'"
|
||||||
# Test
|
# Test
|
||||||
- nix develop --command dotnet -- test
|
- nix develop --command dotnet -- test
|
||||||
- nix develop --command dotnet -- test --configuration Release
|
- nix develop --command dotnet -- test --configuration Release
|
||||||
# Perform build
|
# Perform build
|
||||||
- "pushd RaftFable && nix develop --command npm -- install && popd"
|
- "pushd RaftFable && nix develop --command npm -- install && popd"
|
||||||
- "pushd RaftFable && nix develop --command npm -- run-script build && popd"
|
- "pushd RaftFable && nix develop --command npm -- run-script build && popd"
|
||||||
|
|
||||||
when:
|
when:
|
||||||
evaluate: '(CI_PIPELINE_EVENT == "push" && CI_COMMIT_BRANCH == CI_REPO_DEFAULT_BRANCH) || (CI_PIPELINE_EVENT == "pull_request")'
|
- event: "push"
|
||||||
|
evaluate: 'CI_COMMIT_BRANCH == CI_REPO_DEFAULT_BRANCH'
|
||||||
|
- event: "pull_request"
|
||||||
|
Reference in New Issue
Block a user