Skip to content

Commit 20cfe0d

Browse files
committed
Initial creation of the badges branch triggered failure in git because too many files were changed/removed in git diff.
1 parent b72fc7f commit 20cfe0d

1 file changed

Lines changed: 7 additions & 15 deletions

File tree

.github/workflows/ci.yml

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -575,13 +575,9 @@ jobs:
575575
steps:
576576
- uses: actions/checkout@v4
577577
- name: Set up badges branch
578-
run: 'git fetch origin badges || true
579-
580-
git checkout badges || git checkout --orphan badges
581-
582-
mkdir -p status
583-
584-
rm -rf .github tests src include docs scripts docker build toolchains'
578+
run: "git fetch origin badges || true\nif git checkout badges; then\n echo\
579+
\ \"Switched to existing badges branch\"\nelse\n git checkout --orphan\
580+
\ badges\n git rm -rf .\nfi\nmkdir -p status\n"
585581
- name: Set up directory
586582
run: mkdir -p status
587583
- name: Generate badge for x86_64-pc-windows-msvc
@@ -975,13 +971,9 @@ jobs:
975971
11\">\n <text x=\"80\" y=\"14\">mipsel-unknown-linux-gnu</text>\n \
976972
\ <text x=\"190\" y=\"14\">${TEXT}</text>\n </g>\n</svg>\nSVGEOF\n"
977973
- name: Commit and push badges
978-
run: 'git config user.name "GitHub Actions"
979-
980-
git config user.email "actions@github.com"
981-
982-
git add status/*.svg
983-
984-
git diff --quiet && git diff --staged --quiet || (git commit -m "Update
985-
build status badges [skip ci]" && git push origin badges)'
974+
run: "git config user.name \"GitHub Actions\"\ngit config user.email \"actions@github.com\"\
975+
\ngit add status/*.svg\nif ! git diff --staged --quiet; then\n git commit\
976+
\ -m \"Update build status badges [skip ci]\"\n git push origin badges\n\
977+
else\n echo \"No badge changes to commit.\"\nfi\n"
986978
env:
987979
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: 'true'

0 commit comments

Comments
 (0)