Thanks to visit codestin.com
Credit goes to github.com

Skip to content

CI GitHub actions not pulling the branch from a fork to test and build the PR coming from a fork #979

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

Closed
exequiel09 opened this issue Oct 10, 2021 · 1 comment · Fixed by #992

Comments

@exequiel09
Copy link
Contributor

Description

In #974 CI action, It tries to pull my branch in the main repo instead of the forked repo. See the logs.

I think the line in the GitHub action below only works when someone from the organization creates a pull request but not from someone outside the organization who has to fork the repo to create a PR.

ref: ${{ github.event.pull_request.head.ref }}

Steps to Reproduce the Issue

Fork the repo. Create a PR and let the maintainer run the CI for first time contributors to this repo like me 😅.

Notes

I think we need to use github.ref or $GITHUB_REF to get the ref to the PR from forks. Other instances of happening this is in #678 (logs)

@exequiel09 exequiel09 changed the title CI GitHub actions not pulling the branch from a fork to test the PR coming from a fork CI GitHub actions not pulling the branch from a fork to test and build the PR coming from a fork Oct 10, 2021
@hoebbelsB
Copy link
Member

thx @exequiel09 ! we'll fix it today so that we can merge your other PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants