Skip to content

Commit 6c2ea9d

Browse files
committed
ci(badge): Push only when changes happened to badge
1 parent 676a62c commit 6c2ea9d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.github/workflows/tests_results.yml

+6-4
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ jobs:
120120
121121
- name: Generate badge
122122
if: ${{ !cancelled() && (env.original_event == 'schedule' || env.original_event == 'workflow_dispatch') }}
123-
uses: jaywcjlove/generated-badges@main
123+
uses: jaywcjlove/generated-badges@v1.0.13
124124
with:
125125
label: Runtime Tests
126126
status: ${{ job.status }}
@@ -132,6 +132,8 @@ jobs:
132132
run: |
133133
git config user.name "github-actions[bot]"
134134
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
135-
git add --all
136-
git commit -m "Updated runtime tests badge"
137-
git push origin HEAD:gh-pages
135+
if [[ `git status --porcelain` ]]; then
136+
git add --all
137+
git commit -m "Updated runtime tests badge"
138+
git push origin HEAD:gh-pages
139+
fi

0 commit comments

Comments
 (0)