Skip to content

Commit

Permalink
fix CI concurrency settings
Browse files Browse the repository at this point in the history
 add base_ref to the group so that two parallel branch sync PRs
 won't cancel each other
  • Loading branch information
mbien committed Aug 17, 2022
1 parent eb1cf21 commit 89ef85f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ on:
push:
pull_request:

# cancel PR workflow run if PR is updated while jobs are still running
# if this is not a PR run (no github.head_ref defined), it won't be affected
# cancel other PR workflow run in the same head-base group if it exists (e.g. during PR syncs)
# if this is not a PR run (no github.head_ref and github.base_ref defined), use an UID as group
concurrency:
group: ${{ github.head_ref || github.run_id }}
group: ${{ github.head_ref || github.run_id }}-${{ github.base_ref }}
cancel-in-progress: true

jobs:
Expand Down

0 comments on commit 89ef85f

Please sign in to comment.