diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index 953d99f..5b844b6 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -45,12 +45,14 @@ jobs: done done + rm _data/rules.json + # https://peterevans.dev/posts/github-actions-how-to-automate-code-formatting-in-pull-requests/ - name: Check for modified files id: git-check - run: echo ::set-output name=modified::$(if git diff-index --quiet HEAD --; then echo "false"; else echo "true"; fi) + run: echo ::set-output name=modified::$(git status -s --porcelain | wc -l | awk '{$1=$1};1') - name: Push changes - if: steps.git-check.outputs.modified == 'true' + if: steps.git-check.outputs.modified != '0' run: | git config --global user.name 'Samuel Berthe' git config --global user.email 'samuel-berthe@users.noreply.github.com'