Skip to content

Commit 1c7fb31

Browse files
authored
Alternative solution for ensuring it runs in the repo
1 parent b9c6afa commit 1c7fb31

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/add-lockdown-label.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
name: Add Branch Lockdown Label to PRs
22

33
on:
4-
pull_request:
4+
pull_request_target:
55
workflow_dispatch: # Allows manual triggering of the workflow
6+
branches:
7+
- 'release/8.*'
8+
- 'release/9.*'
9+
- 'release/10.*'
10+
- 'main'
611

712
permissions:
813
actions: write # For managing the operation state cache
@@ -11,6 +16,8 @@ permissions:
1116
jobs:
1217
add-label:
1318
runs-on: ubuntu-latest
19+
# Only run on the main repository, not forks
20+
if: github.repository == 'dotnet/sdk'
1421

1522
permissions:
1623
contents: read

0 commit comments

Comments
 (0)