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 1515 steps :
1616 - name : Checkout repository
1717 uses : actions/checkout@v2
18+ with :
19+ fetch-depth : 0
1820
1921 - name : Set up Node.js
2022 uses : actions/setup-node@v2
3537 COVERAGE=$(cat coverage/coverage-summary.json | jq '.total.lines.pct')
3638 echo "" > coverage/coverage_badge.md
3739
40+ - name : Create and switch to a new branch
41+ run : |
42+ git checkout -b update-coverage-badge
43+
3844 - name : Update README with coverage badge
3945 run : |
4046 BADGE_CONTENT=$(cat coverage/coverage_badge.md)
4652 git config --local user.name "${{ secrets.GIT_USER_NAME }}"
4753 git add README.md
4854 git commit -m "Update coverage badge"
49- git push
55+ git push origin update-coverage-badge
5056 env :
5157 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