Skip to content

Commit 9246bd7

Browse files
committed
fix(ci): skip auto-approve for github-actions[bot] authored PRs
GITHUB_TOKEN resolves to github-actions[bot], which cannot approve PRs authored by the same identity (e.g., release-please PRs). Check the PR author to skip the job entirely instead of failing. Ref: #77 Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
1 parent 19d1ae9 commit 9246bd7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/auto-approve.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ jobs:
2020
contents: write
2121
pull-requests: write
2222
if: >-
23-
github.actor == 'SebTardif' ||
24-
github.actor == 'dependabot[bot]'
23+
github.event.pull_request.user.login != 'github-actions[bot]' &&
24+
(github.actor == 'SebTardif' || github.actor == 'dependabot[bot]')
2525
steps:
2626
- name: Harden runner
2727
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0

0 commit comments

Comments
 (0)