-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Action checks out incorrect branch #5
Comments
can you try: steps:
- uses: actions/checkout@v1.0.0
with:
ref: refs/heads/master |
Unless actions work differently now, the official documentation is incorrect here. The |
@peter-evans the doc is wrong, i will file issue for the doc problem. |
That did the trick, thanks! I'll leave this issue open in case you'd like to use it to track the documentation fix. |
close this since the doc get a little bit better. still waiting for more improvement |
I am trying to use this Action from a Workflow which responds to the
pull_request
event. Specifically, I'd like it to check out the branch namedmaster
:However, the logs show that the Action is not checking out the
master
branch. Instead, it appears to be fetching the GitHub-specific "merge" reference for the pull request that triggered the Workflow. The following command is listed in the logs:This is a problem for a couple reasons.
First, subsequent steps in the Workflow use secret values. I do not want to execute the untrusted code of a pull request in the presence of those values.
Second, many people (and the automated scripts in my project) delete the pull request branch immediately after closing the pull request, causing GitHub to delete the corresponding
refs/pull/XX/merge
git ref. That prevents the action from running under these conditions, even though I don't actually need the deleted ref.The text was updated successfully, but these errors were encountered: