File tree 1 file changed +33
-0
lines changed
1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change 37
37
env :
38
38
DEEPSOURCE_DSN : ${{ secrets.DEEPSOURCE_DSN }}
39
39
BADGE_PATH : ${{ steps.extract_branch.outputs.branch }}/test-badge.svg
40
+
41
+ - name : Generate the badge SVG image
42
+
43
+ id : badge
44
+ with :
45
+ label : ' Test coverage'
46
+ status : ${{ steps.coverage.outputs.lines }}
47
+ color : ' blue,555,daf'
48
+ path : ${{ steps.coverage.outputs.path }}
49
+
50
+ - name : Upload badge as artifact
51
+ uses : actions/upload-artifact@v3
52
+ with :
53
+ name : badge
54
+ path : ${{ steps.coverage.outputs.path }}
55
+ if-no-files-found : error
56
+
57
+ - name : Commit badge
58
+ continue-on-error : true
59
+ env :
60
+ BADGE : ${{ steps.coverage.outputs.path }}
61
+ run : |
62
+ git config --local user.email "[email protected] "
63
+ git config --local user.name "GitHub Action"
64
+ git add "${BADGE}"
65
+ git commit -m "Add/Update badge"
66
+
67
+ - name : Push badge commit
68
+ uses : ad-m/github-push-action@master
69
+ if : ${{ success() }}
70
+ with :
71
+ github_token : ${{ secrets.GITHUB_TOKEN }}
72
+ branch : ${{ steps.coverage.outputs.branch }}
You can’t perform that action at this time.
0 commit comments