CI: try to make push of flake-update to main work
It currently fails with ``` ! [rejected] HEAD -> main (fetch first) error: failed to push some refs to 'https://github.com/marienz/nix-doom-emacs-unstraightened' 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. ``` Our local checkout is shallow. Assume we can fix this by fetching just the parent of the commit we want to push, which should be the commit origin/main points at.
This commit is contained in:
parent
5e2835bffe
commit
0c55f6064f
1 changed files with 4 additions and 0 deletions
4
.github/workflows/push-flake-update.yml
vendored
4
.github/workflows/push-flake-update.yml
vendored
|
|
@ -28,6 +28,10 @@ jobs:
|
|||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: flake-update
|
||||
# Fetch the parent of the commit we want to push too:
|
||||
# that should be the current ref of `main`, which we need
|
||||
# for push to succeed (without forcing).
|
||||
fetch-depth: 2
|
||||
- name: Push changes
|
||||
run: git push origin HEAD:main
|
||||
# `git push` only works because branch protection is not enabled.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue