From 3b77a27e1a2a560cdf8eb83087cdffd0d4cb7533 Mon Sep 17 00:00:00 2001 From: Edoardo Pirovano Date: Mon, 26 Jul 2021 15:14:35 +0100 Subject: [PATCH] Address further PR comment --- .github/workflows/update-dependencies.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/update-dependencies.yml b/.github/workflows/update-dependencies.yml index 6511dbb2d..811dc6230 100644 --- a/.github/workflows/update-dependencies.yml +++ b/.github/workflows/update-dependencies.yml @@ -29,12 +29,10 @@ jobs: npm install npm ci npm run removeNPMAbsolutePaths - git config --global user.email "github-actions@github.com" - git config --global user.name "github-actions[bot]" - git add node_modules - if ! git commit -am "Update checked-in dependencies" ; then - echo "No changes detected, skipping pushing..." - exit 0 + if [ ! -z "$(git status --porcelain)" ]; then + git config --global user.email "github-actions@github.com" + git config --global user.name "github-actions[bot]" + git add node_modules + git commit -am "Update checked-in dependencies" + git push origin "$BRANCH" fi - git push origin "$BRANCH" -