Skip to content

Commit

Permalink
coverage yml update
Browse files Browse the repository at this point in the history
  • Loading branch information
0xlucyfer authored and 0xlucyfer committed Sep 11, 2023
1 parent 53ab88b commit bd97019
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@ jobs:
- name: Extract coverage percentage and update README
run: |
COVERAGE=$(grep -Eo 'TOTAL.*[0-9]{1,3}%' coverage.txt | grep -Eo '[0-9]{1,3}%')
BADGE_URL="https://img.shields.io/badge/Coverage-$COVERAGE-brightgreen.svg"
COVERAGE=$(grep -Eo 'TOTAL.*[0-9]{1,3}%' coverage.txt | grep -Eo '[0-9]{1,3}')
ENCODED_COVERAGE="${COVERAGE}%25" # URL encode the percentage
BADGE_URL="https://img.shields.io/badge/Coverage-$ENCODED_COVERAGE-brightgreen.svg"
sed -i "s|https://img.shields.io/badge/Coverage-.*-brightgreen.svg|$BADGE_URL|" README.md
- name: Commit changes
run: |
git config --local user.email "[email protected]"
Expand Down

0 comments on commit bd97019

Please sign in to comment.