Skip to content

Commit

Permalink
trying to fix coverage badge workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
kisnikser committed Dec 10, 2024
1 parent 58f19ab commit 790ae2c
Showing 1 changed file with 2 additions and 22 deletions.
24 changes: 2 additions & 22 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,31 +40,11 @@ jobs:
echo "::set-output name=changes::true"
fi
- name: Commit coverage badge
- name: Commit and push coverage badge
if: steps.check_changes.outputs.changes == 'true'
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git checkout -b coverage-badge
git add coverage-badge.svg
git commit -m "Update coverage badge"
git push --force origin coverage-badge
- name: Create Pull Request
if: steps.check_changes.outputs.changes == 'true'
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Update coverage badge"
branch: coverage-badge
base: main
title: "Update coverage badge"
body: "This pull request updates the coverage badge based on the latest test results."

- name: Merge Pull Request
if: steps.check_changes.outputs.changes == 'true'
uses: peter-evans/enable-pull-request-automerge@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
pull-request-number: ${{ steps.create-pull-request.outputs.pull-request-number }}
merge-method: merge
git push origin main

0 comments on commit 790ae2c

Please sign in to comment.