Skip to content

Commit baa5ba6

Browse files
committed
Fix workflow concurrency under pull_request_target
Turns out `github.ref` doesn't point to the pull request's ref when using `pull_request_target`: NixOS/nixpkgs#306430
1 parent af36cb7 commit baa5ba6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/main.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ on:
99
branches:
1010
- master
1111

12-
concurrency:
13-
group: ${{ github.ref }}
14-
cancel-in-progress: true
15-
1612
jobs:
1713
check:
1814
runs-on: ubuntu-latest
@@ -38,6 +34,10 @@ jobs:
3834
nixpkgs-diff:
3935
runs-on: ubuntu-latest
4036
if: github.event_name != 'push'
37+
# Ensures that we don't run two comment-posting workflows at the same time
38+
concurrency:
39+
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
40+
cancel-in-progress: true
4141
steps:
4242
- name: Find Comment
4343
uses: peter-evans/find-comment@v3

0 commit comments

Comments
 (0)