From 5ff47de10a905d056208325518dd4c0ba534bb2f Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Thu, 17 Aug 2023 23:39:39 +0200 Subject: [PATCH] Prevent commit if nothing changed --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index d0a0961..a9f8527 100644 --- a/.drone.yml +++ b/.drone.yml @@ -135,7 +135,7 @@ steps: - chmod 600 $HOME/.ssh/known_hosts - ssh-keyscan -H git.2martens.de > $HOME/.ssh/known_hosts 2>/dev/null - git add ansible/inventories/host_vars/api-server/public.yaml - - git commit -m "[Drone] Changed wahlrecht_image_version to ${DRONE_SEMVER}" + - git diff-index --quiet HEAD || git commit -m "[Drone] Changed wahlrecht_image_version to ${DRONE_SEMVER}" - git push origin main - name: deploy image image: plugins/ansible:latest