File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed
Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -88,20 +88,17 @@ jobs:
8888 id : changed_files
8989 with :
9090 files : ${{ env.cov_badge_path }}
91- - name : Commit files
91+ - name : Push coverage badge
9292 if : steps.changed_files.outputs.files_changed == 'true'
9393 run : |
9494 git config --local user.email "github-actions[bot]@users.noreply.github.com"
9595 git config --local user.name "github-actions[bot]"
96+ git fetch origin
97+ git checkout coverage-badge || git checkout -b coverage-badge
9698 git add $cov_badge_path
97- git commit -m "Updated coverage.svg"
98- - name : Push changes
99- if : steps.changed_files.outputs.files_changed == 'true'
100- uses : ad-m/github-push-action@master
101- with :
102- branch : ${{ github.head_ref || github.ref_name }}
103- force : true
104- github_token : ${{ secrets.GITHUB_TOKEN }}
99+ git diff --cached --quiet && exit 0
100+ git commit -m "Update coverage badge"
101+ git push origin coverage-badge --force
105102 deploy :
106103 runs-on : ubuntu-latest
107104 needs : [prepare, coverage]
You can’t perform that action at this time.
0 commit comments