Commit bc2eb75
ci(test): skip test-trigger-other-job when token is read-only
The test-trigger-other-job job runs `gh workflow run`, which requires
`actions: write` on the GITHUB_TOKEN. The job has been failing on:
- Fork PRs (e.g. contributor PRs from forks): fork-originated PRs
always receive a read-only GITHUB_TOKEN.
- Dependabot PRs (e.g. #15): even though dependabot creates branches
in the same repo, the dependabot[bot] actor receives a restricted
token by default.
Both produce:
could not create workflow dispatch event: HTTP 403:
Resource not accessible by integration
Skip this job in both cases by gating on `head.repo.full_name` and on
`github.actor`. The job continues to run on PRs from same-repo
branches authored by humans, where the token has the required
permissions.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 7247d00 commit bc2eb75
1 file changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
84 | 92 | | |
85 | 93 | | |
86 | 94 | | |
| |||
0 commit comments