File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 15
15
steps :
16
16
- name : Checkout repository
17
17
uses : actions/checkout@v2
18
+ with :
19
+ fetch-depth : 0
18
20
19
21
- name : Set up Node.js
20
22
uses : actions/setup-node@v2
35
37
COVERAGE=$(cat coverage/coverage-summary.json | jq '.total.lines.pct')
36
38
echo "" > coverage/coverage_badge.md
37
39
40
+ - name : Create and switch to a new branch
41
+ run : |
42
+ git checkout -b update-coverage-badge
43
+
38
44
- name : Update README with coverage badge
39
45
run : |
40
46
BADGE_CONTENT=$(cat coverage/coverage_badge.md)
46
52
git config --local user.name "${{ secrets.GIT_USER_NAME }}"
47
53
git add README.md
48
54
git commit -m "Update coverage badge"
49
- git push
55
+ git push origin update-coverage-badge
50
56
env :
51
57
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
58
+
59
+ - name : Create Pull Request
60
+ uses : peter-evans/create-pull-request@v3
61
+ with :
62
+ title : " Update coverage badge"
63
+ body : " This PR updates the coverage badge in README."
64
+ base : main
65
+ head : update-coverage-badge
You can’t perform that action at this time.
0 commit comments