Skip to content

Commit

Permalink
Use action github-push-action to push badge
Browse files Browse the repository at this point in the history
  • Loading branch information
BjoernWaechter committed Nov 13, 2023
1 parent 35b3419 commit 7b79efb
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,24 @@ jobs:
uses: tj-actions/coverage-badge-py@v2
with:
output: coverage/coverage.svg
- name: Publish coverage report to coverage-badge branch
uses: JamesIves/github-pages-deploy-action@v4

- name: Verify Changed files
uses: tj-actions/verify-changed-files@v16
id: verify-changed-files
with:
files: coverage/coverage.svg

- name: Commit files
if: steps.verify-changed-files.outputs.files_changed == 'true'
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add coverage/coverage.svg
git commit -m "Updated coverage.svg"
- name: Push changes
if: steps.verify-changed-files.outputs.files_changed == 'true'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.github_token }}
branch: badges
folder: coverage

0 comments on commit 7b79efb

Please sign in to comment.