Skip to content

Run GitHub Actions on forked repository for pushing certain changes #26865

Answered by weide-zhou
uditgaurav asked this question in Actions
Discussion options

You must be logged in to vote

Hi @uditgaurav,

When you create a PR from forked repo to base repo, the PR is created on the BASE repo not forked repo. Therefore, if you comment to PR, the ‘issue_comment’ will only be triggered on base repo(if you put it on base repo default branch), not on forked repo.

On forked repo, you need to enable github action on ‘actions’ tab firstly. And then you can create a workflow (eg: event push…etc) on forked repo, to commit changes before PR merge.

If you don’t have forked repo access token, you cannot commit to forked repo.

If you have forked repo token, on base repo, you can checkout forked branch(get info from Github Context), commit the changes to forked repo…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants