While pull_request_target used to be the way to workaround "pull requests from forked repositories" issue, workflow_run is much more flexible. The current modern best practice for both "Pull requests from forked repositories" and "Dependabot PRs" scenarios is to have a pull_request workflow generating and uploading artifacts and a downstream workflow_run downloading generated artifacts and subsequently executing any privileged actions such as commenting on PRs.
Sample actions with first class support for workflow_run:
Interesting. Would you be able to create a PR against: https://github.com/thsaravana/jacoco-playground with this use-case so that I can test this out, and in turn use that to test the implementation as well?
At the moment only
pull_request
,pull_request_target
andpush
events are supported:https://github.com/Madrapps/jacoco-report/blob/f4a835c46ef0f03b3ecefd583f22d7c857f34925/src/action.ts#L59-L75
While
pull_request_target
used to be the way to workaround "pull requests from forked repositories" issue,workflow_run
is much more flexible. The current modern best practice for both "Pull requests from forked repositories" and "Dependabot PRs" scenarios is to have apull_request
workflow generating and uploading artifacts and a downstreamworkflow_run
downloading generated artifacts and subsequently executing any privileged actions such as commenting on PRs.Sample actions with first class support for
workflow_run
: