Skip to content

Commit 61adf24

Browse files
authored
Update workflow to target specific branches and repo
1 parent 1c7fb31 commit 61adf24

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
11
name: Remove Lockdown Label from PRs
22

33
on:
4-
pull_request:
5-
types: [closed]
4+
pull_request_target:
5+
branches:
6+
- 'release/8.*'
7+
- 'release/9.*'
8+
- 'release/10.*'
9+
- 'main'
610

711
permissions:
812
actions: write
913
pull-requests: write
1014

1115
jobs:
1216
remove-labels:
13-
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'Branding')
17+
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'Branding') && github.repository == 'dotnet/sdk'
1418
runs-on: ubuntu-latest
19+
# Only run on the main repository, not forks
1520
steps:
1621
- name: PR's only change is <VersionFeature> in eng/Versions.props
1722
id: only_version_feature_changed

0 commit comments

Comments
 (0)