From 5b20ab8a36c31f990355f859dc4554b609c2e923 Mon Sep 17 00:00:00 2001 From: Fedja Beader Date: Wed, 17 Apr 2024 20:59:01 +0200 Subject: Skip commit if there is nothing to do. Otherwise git commit errors out the job --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bbf1c315..93bfdaf1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,13 +22,13 @@ legacy: - ./evolved.py - cd .. - git status + - (git status --porcelain | grep '.*') || exit 0 # skip if nothing to commit - git config user.email "numa@themanaworld.org" - git config user.name "Numa" - git commit -a -m "Regenerate databases" --author="Numa " - git push # may cause a CI loop >.< only: - master - allow_failure: true evolved: stage: deploy @@ -45,13 +45,13 @@ evolved: - cp -v ../world/map/db/mob_db.conf db/pre-re/ - cp -v ../world/map/db/item_db.conf db/pre-re/ - git status + - (git status --porcelain | grep '.*') || exit 0 # skip if nothing to commit - git config user.email "numa@themanaworld.org" - git config user.name "Numa" - git commit -a -m "Sync with Legacy repo" --author="Numa " - git push only: - master - allow_failure: true pages: stage: deploy -- cgit v1.2.3-60-g2f50