-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failing to commit to fork in pull requests #455
Comments
I think I've figured out how to ensure that cloning works even from forks.
Working:
Not working:
Even if "Allow changes by maintainers" is enabled (i.e. actions are not enabled on the fork), I get a EDIT: never mind, tried with ssh-key and getting exactly the same error 😔 |
I'm also unable to find a way to push commits from a base repository's action to a forked branch. I've been working with the new I get an error when the job tries to push to the forked branch / HEAD, i.e.
and have tried variations that include:
with no luck. I'm not sure this is an issue with |
Running into a few issues around this as well, I suspect it's a case of needing an example of some run steps required when working in the Doing a push using the following might work a bit better, but I've yet to check if the injected GITHUB_TOKEN can push to hidden refs:
Unfortunately, the GITHUB_TOKEN is rejected from pushing to hidden refs. |
The I'm using it here: https://github.com/Drassil/action-package-version-bump/blob/main/.github/workflows/test.yml#L9 and it gives the GITHUB_TOKEN write permissions on forks. |
Hi this only seems to work for public repos. Private repos don't seem to work. |
Looks like actions/checkout#455
Any help would be great |
Trying to file an issue, because I feel like there must be a solution, but I've been unable to find it so far.
I want to create an action that runs on specific pull requests (based on the label), and commit changes (i.e. fixes) on the same branch.
I tried with the default settings, and when I try to commit, I get this error
After searching in existing issues, I found the suggestion to clone with
ref: ${{ github.head_ref }}
. And that works perfectly, but only if the pull request is coming from the same repository. If I try to run it on a pull request coming from a fork, I get this error instead, still in the cloning phase (Fetching the repository
):If I try adding
fetch-depth: 0
, the error changes totest_pr_outside
it's indeed the name of the branch on the fork, but it's clearly not available inorigin
.Any suggestion?
The text was updated successfully, but these errors were encountered: