File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -76,32 +76,34 @@ jobs:
7676 coverage run -m pytest -s
7777 coverage report -m
7878
79- - name : Create Badge Directory
79+ - uses : actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # pin@v3
8080 if : always() && github.ref_name == 'main' && github.event_name == 'push'
81- run : mkdir -p badges
81+ with :
82+ ref : assets
83+ path : assets
84+
85+ - name : Create Badge Directory
86+ if : github.ref_name == 'main' && github.event_name == 'push'
87+ run : mkdir -p assets/badges
8288
8389 - name : Create Coverage Badge
8490 if : github.ref_name == 'main' && github.event_name == 'push'
8591 uses : tj-actions/coverage-badge-py@782bdaaa8b2e37612e6b6fac5e559e5544e6eef2 # pin@v2
8692 with :
87- output : badges/coverage.svg
93+ output : assets/ badges/coverage.svg
8894
8995 - name : Commit Badge
9096 if : github.ref_name == 'main' && github.event_name == 'push'
9197 run : |
98+ cd assets
9299 if [[ -n "$(git status --porcelain)" ]]; then
93100 git config --local user.email "action@github.com"
94101 git config --local user.name "GitHub Action"
95102 git add badges/coverage.svg
96103 git commit -m "Update coverage badge"
104+ git push
97105 fi
98106
99- - name : Push Badge
100- if : github.ref_name == 'main' && github.event_name == 'push'
101- uses : ad-m/github-push-action@d9117be7cad08757e9e906a1bcd1716d6b192db5 # pin@master
102- with :
103- github_token : ${{ secrets.GITHUB_TOKEN }}
104- branch : assets
105107
106108 deploy :
107109 name : " Deploy"
You can’t perform that action at this time.
0 commit comments