Skip to content

Commit ad1e674

Browse files
authored
Fix releases for PRs from forks (#99)
The [issue][1] was that a new release was not being created properly when the PR came from a fork. The fix is to trigger the release process on [`pull_request_target`][2] rather than `pull_request`. There are some [security concerns][3] to be aware of when using `pull_request_target`, but they are not applicable to our use case here, as we only trigger it when the PR is closed (which means no danger that a malicious actor could run malicious code without it having been reviewed). [1]: https://github.com/SpectoLabs/hoverfly-github-action/actions/runs/13983200352 [2]: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target [3]: https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
1 parent 1ac9d11 commit ad1e674

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/github_tag_and_release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: Release
33

44
on: # yamllint disable-line rule:truthy
5-
pull_request:
5+
pull_request_target:
66
types:
77
- closed
88

0 commit comments

Comments
 (0)