From 78a88dea5ee2bdbcc10195a9c57f3ade1d9b7813 Mon Sep 17 00:00:00 2001 From: nrb <freifunk@nicoboehr.de> Date: Fri, 25 Feb 2022 21:05:01 +0100 Subject: [PATCH] ci: pull again before pushing Sometimes, there are untracked files left in the dl directory, which another job already commited in the DL cache. git pull will then fail becaue it won't overwrite untracked files. By first pulling (which will fail), then commiting and pulling again we will avoid this situation. --- .gitlab-ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7524d25d4..d01b7a05f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -33,8 +33,9 @@ default: - git config --global user.name "FFS Buildbot" - mkdir -p ~/.ssh - cat gitlab-known-hosts >> ~/.ssh/known_hosts - - cd gluon/openwrt/dl && git pull && git add . && git commit -m "update DL cache" || true - - git push || true + - cd gluon/openwrt/dl && git pull + - git add . && git commit -m "update DL cache" || true + - git pull && git push || true generate_date: stage: generate_date -- GitLab