Skip to content

Commit a64f5e0

Browse files
committed
fix check issues if no changes
1 parent 70011ca commit a64f5e0

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.github/workflows/gsg-repo-gen.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,19 @@ jobs:
3030
run: |
3131
gh search repos topic:sparkfun-getting-started --owner sparkfun --json name,url,homepage,description > gsg.json
3232
33-
- name: commit updates to the repo
33+
- name: Check for updates
34+
id: has_updates
3435
run: |
3536
git config --global user.name 'SparkFun Automated Action'
3637
git config --global user.email 'your-username@users.noreply.github.com'
38+
git diff --exit-code gsg.json
39+
continue-on-error: true
40+
41+
- name: Check-in gsg updates
42+
if: steps.has_updates.outcome == 'success'
43+
run: |
3744
git add gsg.json
38-
git commit -am "daily update"
45+
git commit -m "daily update"
3946
git push
4047
4148

0 commit comments

Comments
 (0)