From 53dfecf1c622f4014642f75e32fbead6f1d87d18 Mon Sep 17 00:00:00 2001 From: alecdwm Date: Tue, 3 Oct 2023 00:27:07 +0000 Subject: [PATCH] fix: only commit when changes exist in fetch-external workflow --- .github/workflows/fetch-external.yml | 8 +++++--- assets/test-pls-delete.svg | 10 ---------- 2 files changed, 5 insertions(+), 13 deletions(-) delete mode 100644 assets/test-pls-delete.svg diff --git a/.github/workflows/fetch-external.yml b/.github/workflows/fetch-external.yml index 3115d4fddf..d028caad41 100644 --- a/.github/workflows/fetch-external.yml +++ b/.github/workflows/fetch-external.yml @@ -45,6 +45,8 @@ jobs: git remote set-url origin https://x-access-token:${CHAINDATA_CI_SUPERUSER_ACCESS_TOKEN}@github.com/TalismanSociety/chaindata git config user.name "chaindata-ci-superuser[bot]" git config user.email "146698419+chaindata-ci-superuser[bot]@users.noreply.github.com" - git add . - git commit -m 'updated externals' - git push + if [[ "$(git status --porcelain=v2)" != "" ]; then + git add . + git commit -m 'updated externals' + git push + fi diff --git a/assets/test-pls-delete.svg b/assets/test-pls-delete.svg deleted file mode 100644 index 38e2504510..0000000000 --- a/assets/test-pls-delete.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - \ No newline at end of file