File tree Expand file tree Collapse file tree 1 file changed +3
-14
lines changed Expand file tree Collapse file tree 1 file changed +3
-14
lines changed Original file line number Diff line number Diff line change @@ -111,7 +111,6 @@ jobs:
111
111
# CSV JaCoCo report.
112
112
113
113
- name : Generate coverage badge
114
- # if: ${{ github.ref == 'refs/head/master' }}
115
114
uses : cicirello/jacoco-badge-generator@v2
116
115
with :
117
116
badges-directory : images
@@ -120,24 +119,14 @@ jobs:
120
119
121
120
# The saved badge does not appear when you pull code locally
122
121
- name : Add coverage to CI repo
123
- # if: ${{ github.ref == 'refs/head/master' }}
122
+ # Limit frontpage badge to mainline code, not branches or PRs
123
+ if : ${{ github.ref == 'refs/head/master' }}
124
124
run : |
125
125
cd images
126
126
if [[ ! -z "$(git status --porcelain *.svg)" ]]; then
127
127
git config --global user.name 'github-actions'
128
128
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
129
129
git add *.svg
130
130
git commit -m 'Autogenerated coverage badge'
131
- git push || echo "$0: Another build won for coverage badge" >&2
132
- fi
133
- - name : Add coverage to repo
134
- # if: ${{ github.ref == 'refs/head/master' }}
135
- run : |
136
- cd images
137
- if [[ ! -z "$(git status --porcelain *.svg)" ]]; then
138
- git config --global user.name 'github-actions'
139
- git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
140
- git add *.svg
141
- git commit -m 'Autogenerated coverage badge'
142
- git push || echo "$0: Another build won for coverage badge" >&2
131
+ git push
143
132
fi
You can’t perform that action at this time.
0 commit comments