Skip to content

Commit e2ed579

Browse files
committed
Add guard to prevent unwanted error
1 parent 4abfc00 commit e2ed579

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/autodl.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,20 @@ jobs:
2020
with:
2121
input_file: lib/colors.json
2222
- name: Config Git
23-
id: gitconf
2423
run: |
2524
git config --local user.name "Colour fetch"
2625
git config --local user.email "enquiry@rk0cc.xyz"
26+
- name: Check differences
27+
id: difference
28+
run: git diff --quite
29+
continue-on-error: true
30+
- name: Add and commit
31+
if: steps.difference.outcome == 'failure'
32+
run: |
2733
git add .
2834
git commit -m "Update colour backup data"
2935
- name: Push
36+
if: steps.difference.outcome == 'failure'
3037
uses: ad-m/github-push-action@master
3138
with:
3239
github_token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)