ci/eval: cancel previous run if new code is pushed#357990
ci/eval: cancel previous run if new code is pushed#357990Mic92 wants to merge 1 commit intoNixOS:masterfrom
Conversation
infinisil
left a comment
There was a problem hiding this comment.
Looks good to me, though I haven't tested it
| # Cancel previous if someone pushed an update | ||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
| cancel-in-progress: true | ||
|
|
There was a problem hiding this comment.
By now we also trigger eval on push - and we need to make sure to not cancel previous commit on target branches, to prevent the eval jobs from failing to compare against the target branch.
The non-PR fallback of github.ref will create one group for each target branch, thus cancelling all previous commits.
The way I did it in the PostgREST repo is by falling back to github.run_id for non PRs. This results in never cancelling on the master/staging etc. branches.
| # Cancel previous if someone pushed an update | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| # Cancel previous job if someone pushed an update, but only in pull requests, not for push events. | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} | |
| cancel-in-progress: true | |
|
Was there a decision against doing that in principle? I think it does make sense to do this. |
No. I probably just won't get to it. |
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.