aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThéo Zimmermann2020-09-17 18:28:23 +0200
committerThéo Zimmermann2020-09-17 18:28:23 +0200
commit73db4e3dd8146f605bc1d823cf61a6c5d80e41dd (patch)
tree40c0def8d8cd3e2dab1b142dec73f9993b3f79c6
parent08791151b904e499cdca26cec4b8aa7c9b1eb4c0 (diff)
[ci/gitlab/cachix] Avoid running in trouble when calling git fetch --unshallow.
-rw-r--r--.gitlab-ci.yml2
1 files changed, 2 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 16f82a19ee..afed5c4f07 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -451,6 +451,8 @@ pkg:nix:deploy:channel:
- pkg:nix:deploy
script:
- echo "$CACHIX_DEPLOYMENT_KEY" | tr -d '\r' | ssh-add - > /dev/null
+ # Remove all pr branches because they could be missing when we run git fetch --unshallow
+ - git branch --list 'pr-*' | xargs -r git branch -d
- git fetch --unshallow
- git branch -v
- git push git@github.com:coq/coq-on-cachix "${CI_COMMIT_SHA}":"refs/heads/${CI_COMMIT_REF_NAME}"