Skip to content

Commit d1575db

Browse files
authored
ci: Run PR label check only in pull request contexts (#94)
This is intended to only run the PR label checker for events occuring in a pull request context (cases where the `event_name` is `pull_request_target` and not pushes).
1 parent 866cc41 commit d1575db

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/release-drafter.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ permissions:
1717

1818
jobs:
1919
update_release_draft:
20+
name: Update the release notes
2021
permissions:
2122
contents: write
2223
pull-requests: write
@@ -37,7 +38,7 @@ jobs:
3738
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3839
pr-checker:
3940
name: Ensure Proper Pull Request Labels
40-
if: ${{ always() }}
41+
if: github.event_name == 'pull_request_target'
4142
needs: update_release_draft
4243
permissions:
4344
pull-requests: read
@@ -47,4 +48,4 @@ jobs:
4748
- uses: docker://agilepathway/pull-request-label-checker:v1.6.65
4849
with:
4950
any_of: feature,fix,style,changed,refactor,perf,test,build,ci,chore,revert,deprecated,removed,security,documentation,dependencies
50-
repo_token: ${{ secrets.GITHUB_TOKEN }}
51+
repo_token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)