create-pull-request: Can't push pull request branch
Subject of the issue
Getting error Pushing pull request branch to 'origin/promote'
after upgrade v3
/usr/bin/git push --force-with-lease origin HEAD:refs/heads/promote
To https://github.com/<retacted>
! [rejected] HEAD -> promote (stale info)
error: failed to push some refs to 'https://github.com/<retacted>'
Error: The process '/usr/bin/git' failed with exit code 1
Steps to reproduce
Not sure if it’s reproducible outside of our repo. We’re using the on schedule
action to create image promotion PR’s. We only upgraded v3 because of the The set-env command is disabled.
warnings.
Possibly, create a new branch not exist remotely could reproduces the error.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 17 (7 by maintainers)
Commits related to this issue
- Upgrade peter-evans/create-pull-request to v3 since v2 no longer works. ref. peter-evans/create-pull-request/issues/633 — committed to fukamachi/dockerfiles by fukamachi 4 years ago
- Upgrade peter-evans/create-pull-request to v3 since v2 no longer works. ref. peter-evans/create-pull-request/issues/633 — committed to fukamachi/dockerfiles by fukamachi 4 years ago
@aweris @fglaeser I have a workaround until I can fix the action. Add the following line to your workflow after the checkout step.
@sarathnairck12,
This error is related to a recent security update in runners. The command basically disabled. You can try to upgrade
v3
since the new version is written in Typescript. It’s not usingset-env
anymore.Blog: https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/