Avoid failure if @types/node is already 12.12

This commit is contained in:
Edoardo Pirovano
2022-03-30 14:00:43 +01:00
parent f83be76fd8
commit 9da34a6ec6

View File

@@ -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