From 67f4d78e01ffdeaa32027a9415050fe8d78ec4f9 Mon Sep 17 00:00:00 2001
From: nrb <freifunk@nicoboehr.de>
Date: Tue, 17 Nov 2020 17:57:36 +0100
Subject: [PATCH] ci: pull before pusing download cache

When other buld jobs updated the build cache, they might be faster
pushing then us. So pull before we push to incorporate their changes
first.
---
 .gitlab-ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index cb3321731..f93c8a5ff 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -43,7 +43,7 @@ update:
     - rm -rf gluon/openwrt/dl && mkdir -p gluon/openwrt && ln -s ../../ffs-openwrt-dl-cache gluon/openwrt/dl
   script:
     - make -C gluon GLUON_SITEDIR="$CI_PROJECT_DIR" GLUON_TARGET="$GLUON_TARGET" GLUON_BRANCH=stable FFS_BUILD_DATE=$(cat build.date) V=1 -j`nproc`
-    - cd gluon/openwrt/dl && git add . && git commit -m "update DL cache" && git push || true
+    - cd gluon/openwrt/dl && git add . && git commit -m "update DL cache" && git pull --rebase && git push || true
   except:
     - tags
   artifacts: 
-- 
GitLab