Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/eval.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ name: Eval

on: pull_request_target

# Cancel previous if someone pushed an update
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

Comment on lines +5 to +9
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
# 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

permissions:
contents: read

Expand Down