mirror of
https://github.com/Ryujinx/Ryujinx-Games-List.git
synced 2024-08-19 21:02:14 +00:00
Only create a new commit if stats changed
This commit is contained in:
parent
9944dcccf4
commit
d589cb711e
13
.github/workflows/label-stats.yml
vendored
13
.github/workflows/label-stats.yml
vendored
|
@ -59,10 +59,21 @@ jobs:
|
||||||
${{ steps.stats.outputs.result }}
|
${{ steps.stats.outputs.result }}
|
||||||
$EOF
|
$EOF
|
||||||
|
|
||||||
- name: Commit stats
|
- name: Configure git
|
||||||
run: |
|
run: |
|
||||||
git config user.name github-actions[bot]
|
git config user.name github-actions[bot]
|
||||||
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
||||||
|
|
||||||
|
- name: Check if files have been modified
|
||||||
|
id: mod_check
|
||||||
|
run: |
|
||||||
|
[[ $(git status -s | wc -l) -le 1 ]] \
|
||||||
|
&& echo "is-dirty=false" >> "$GITHUB_OUTPUT" \
|
||||||
|
|| echo "is-dirty=true" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
- name: Commit and push stats
|
||||||
|
if: steps.mod_check.outputs.is-dirty == 'true'
|
||||||
|
run: |
|
||||||
git add .
|
git add .
|
||||||
git commit -m "Update compat-stats.json"
|
git commit -m "Update compat-stats.json"
|
||||||
git push
|
git push
|
||||||
|
|
Loading…
Reference in a new issue