Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,18 @@ jobs:
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
cp -r .github/badges /tmp/badges
git fetch origin badges --depth=1 2>/dev/null && git checkout badges \
|| { git checkout --orphan badges && git rm -rf .; }
rm -rf .github/badges

if git ls-remote --exit-code --heads origin badges >/dev/null 2>&1; then
git fetch origin badges --depth=1
git switch -C badges FETCH_HEAD
else
git switch --orphan badges
git rm -rf . || true
fi

mkdir -p .github/badges
cp /tmp/badges/*.svg .github/badges/
git add .github/badges/
git diff --cached --quiet || git commit -m "chore: update coverage badge"
git push origin badges
git push origin HEAD:badges
Loading