From a9095cefc93b01d219afb146864906dcaad94c98 Mon Sep 17 00:00:00 2001 From: Edoardo Pirovano Date: Wed, 30 Mar 2022 14:00:43 +0100 Subject: [PATCH] Avoid failure if `@types/node` is already 12.12 --- .github/workflows/pr-checks.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index 6565ea2e94..83494c358d 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -46,11 +46,13 @@ jobs: # `npm install` on Linux. npm install - git config --global user.email "github-actions@github.com" - git config --global user.name "github-actions[bot]" - # The period in `git add --all .` ensures that we stage deleted files too. - git add --all . - git commit -m "Use @types/node=${NODE_TYPES_VERSION}" + if [ ! -z "$(git status --porcelain)" ]; then + git config --global user.email "github-actions@github.com" + git config --global user.name "github-actions[bot]" + # The period in `git add --all .` ensures that we stage deleted files too. + git add --all . + git commit -m "Use @types/node=${NODE_TYPES_VERSION}" + fi - name: Check generated JS run: .github/workflows/script/check-js.sh