From a38cb3bf51e8eef600bcc453eff631ec3a2f6d03 Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Tue, 4 Aug 2020 12:25:49 +0100 Subject: [PATCH] Branch sync - only sync when there is a difference to avoid errors. --- .github/workflows/covsync.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/covsync.yml b/.github/workflows/covsync.yml index 2aec2ca9..6a4eb28a 100644 --- a/.github/workflows/covsync.yml +++ b/.github/workflows/covsync.yml @@ -13,7 +13,13 @@ jobs: with: fetch-depth: 0 - run: | - git checkout -b coverity-fixes origin/fixes - git push origin coverity-fixes - git checkout -b coverity-develop origin/develop - git push origin coverity-develop + git diff --exit-code -s origin/coverity-fixes origin/fixes + if [ "$?" = "1" ]; then + git checkout -b coverity-fixes origin/fixes + git push origin coverity-fixes + fi + git diff --exit-code -s origin/coverity-develop origin/develop + if [ "$?" = "1" ]; then + git checkout -b coverity-develop origin/develop + git push origin coverity-develop + fi