You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The badge update action always tries to push the new badge to the main (repo's default) branch, this will fail for PRs as they are on a different branch.
Expected behavior
When the badge should be updated in a PR it should add the commit to that PR, and the action should never result in an error.
Solution
We need to specify which branch to push to like in this example.
Run ad-m/github-push-action@master
Push to branch main
error: atomic push failed for ref refs/heads/main. status: 5
fatal: protocol error: bad line length character: erro
To https://github.com/gamedig/rust-gamedig.git
! [rejected] HEAD -> main (fetch first)
error: failed to push some refs to 'https://github.com/gamedig/rust-gamedig.git'
hint: Updates were rejected because the remote contains work that you do not
hint: have locally. This is usually caused by another repository pushing to
hint: the same ref. If you want to integrate the remote changes, use
hint: 'git pull' before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
Error: Invalid exit code: 1
at ChildProcess.<anonymous> (/home/runner/work/_actions/ad-m/github-push-action/master/start.js:30:21)
at ChildProcess.emit (node:events:513:28)
at maybeClose (node:internal/child_process:1100:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5) {
code: 1
}
Describe the bug
The badge update action always tries to push the new badge to the main (repo's default) branch, this will fail for PRs as they are on a different branch.
Expected behavior
When the badge should be updated in a PR it should add the commit to that PR, and the action should never result in an error.
Solution
We need to specify which branch to push to like in this example.
Additional context
Push error from action logs
Seen in:
The text was updated successfully, but these errors were encountered: