Skip to content

Commit 56b780f

Browse files
Use branch-deploy action to determine who is allowed to trigger this workflow.
1 parent 75e643a commit 56b780f

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

.github/workflows/changelog.yml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,21 @@
11
name: Update CHANGELOG.md
22
on:
33
issue_comment:
4-
types: [created]
5-
pull_request_target:
6-
types: [opened]
7-
branches:
8-
- dev
4+
types: [created] # Add ".changelog" as a PR comment to trigger this workflow.
95

106
jobs:
117
update_changelog:
128
runs-on: ubuntu-latest
13-
# Run if comment is on a PR with the main repo, and if it contains the magic keywords.
14-
# Or run on PR creation, unless asked otherwise in the title.
15-
if: |
16-
github.repository_owner == 'nf-core' && (
17-
github.event_name == 'pull_request_target' ||
18-
github.event.issue.pull_request && startsWith(github.event.comment.body, '@nf-core-bot changelog')
19-
)
209

2110
steps:
11+
- name: branch-deploy
12+
id: branch-deploy
13+
uses: github/branch-deploy@c9fcc362bdcea69eecac6578dde245cd5e3a55bf # v10.4.3
14+
with:
15+
trigger: ".changelog"
16+
reaction: "eyes"
17+
stable_branch: "dev"
18+
2219
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
2320
with:
2421
token: ${{ secrets.NF_CORE_BOT_AUTH_TOKEN }}

0 commit comments

Comments
 (0)