From 777874c8054a8905d9d68dfada378da65bf9b1cc Mon Sep 17 00:00:00 2001 From: Joshua Barretto Date: Thu, 30 Nov 2023 10:17:06 +0000 Subject: [PATCH] Perform a cleanup before publishing a tag --- .gitlab/CI/publish.gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab/CI/publish.gitlab-ci.yml b/.gitlab/CI/publish.gitlab-ci.yml index 0c1a429060..bda73f5c1a 100644 --- a/.gitlab/CI/publish.gitlab-ci.yml +++ b/.gitlab/CI/publish.gitlab-ci.yml @@ -43,6 +43,8 @@ gittag: - git remote set-url origin https://veloren-bot:${GITLAB_TOKEN_WRITE}@${CI_PROJECT_URL:8} - | if [[ ! "${SCHEDULE_CADENCE}" =~ ${TAG_REGEX} ]]; then + git reflog expire --expire=now --all; + git gc --prune=now; git fetch; git tag -a "${SCHEDULE_CADENCE}" -m '' -f; git push origin "${SCHEDULE_CADENCE}" -f || echo "failed pushed, trying again" && sleep 5 && git status && git fsck && git push origin "${SCHEDULE_CADENCE}" -f;