Skip to content

Commit

Permalink
refix badge
Browse files Browse the repository at this point in the history
  • Loading branch information
maythamfahmi committed Nov 23, 2024
1 parent 50268a8 commit 49738ac
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/3-code-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,25 @@ jobs:
# git commit -m 'Update coverage badge'
# git push
# fi
# Set up Git user
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
# Add and check changes
git add coverage-badge.svg
# Regenerate badge (replace with actual command)
rm -f coverage-badge.svg
generate-coverage-badge # Replace with your actual command
# Verify badge content
echo "Coverage badge content:"
cat coverage-badge.svg
# Force add badge and commit
git add -f coverage-badge.svg
if git diff-index --cached --quiet HEAD; then
echo "No changes to commit"
else
git commit -m 'Update coverage badge'
git push
git push --force
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 49738ac

Please sign in to comment.