This commit is contained in:
Samuel Berthe 2022-06-15 02:05:34 +02:00
parent 9bbe04799f
commit a4809f9e9f
No known key found for this signature in database
GPG key ID: 64863511FFBD0E3C

View file

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