Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Copilot Lvl 3
Message 11 of 16

Re: Run a GitHub action on `pull_request` for PR opened from a forked repo

Secret variables aren't available on PR by default.

 

Here is discussion about possibility to pass secret variable to PR: https://github.community/t5/GitHub-Actions/Make-secrets-available-to-builds-of-forks/m-p/30678#M508

Pilot Lvl 1
Message 12 of 16

Re: Run a GitHub action on `pull_request` for PR opened from a forked repo

I tried this with two accounts that both have Actions enabled:

 

# Create repo for user A
# Fork into B's account

# Add a branch, create a PR back into A

 

... then a `push` action will run in B, but the results will not be shown in the PR at A.

 

Or am I misunderstanding something?

Copilot Lvl 2
Message 13 of 16

Re: Run a GitHub action on `pull_request` for PR opened from a forked repo

Same problem.

Both account with GitHub Action CI enabled but nothing is triggered on the upstream when a PR is made from a fork..

Copilot Lvl 2
Message 14 of 16

Re: Run a GitHub action on `pull_request` for PR opened from a forked repo

Can someone elaborate on whether the marked solution is the current behaviour or the future intended behaviour?

 

Creating a PR from a fork that has Actions enabled currently does not trigger an actions workflow run on upstream but instead triggers the workflow run on the fork

Ground Controller Lvl 2
Message 15 of 16

Re: Run a GitHub action on `pull_request` for PR opened from a forked repo

Hi,

 

Is this true for private repos?

 

No matter which combination of advice I take I cannot get my workflow to run from an upstream PR when the branch being PR'd is from a fork (though the PR is open in the upstream repo). I use a workflow for CI to test the PR'd code.

 

I see that the docs state:

"Note: Workflows do not run on private base repositories when you open a pull request from a forked repository."

 

What am I not understanding as this seems ironic to me given that permissions have to be granted to even gain access to the repo? I.e. if I'm ok with them having access, why should I not be ok with them using a workflow?

 

Thanks

Copilot Lvl 3
Message 16 of 16

Re: Run a GitHub action on `pull_request` for PR opened from a forked repo

We use local action runners. Does this mean, that every person who has a fork of that repository has to set his own local action runner?