🔒 fix: prevent CI loops and add proper git authentication
Some checks failed
CI/CD Pipeline / CI Pipeline (pull_request) Has been cancelled

This commit is contained in:
2026-04-07 08:13:23 +02:00
parent d918f3b1c3
commit b21c5fb093

View File

@@ -54,6 +54,7 @@ jobs:
ci-pipeline:
name: CI Pipeline
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]') && github.actor != 'ci-bot'"
steps:
- name: Checkout code
@@ -101,11 +102,16 @@ jobs:
BADGE_URL="https://img.shields.io/badge/coverage-${COVERAGE}%-${COLOR}?style=flat-square"
sed -i "s|https://img.shields.io/badge/coverage-.*-.*?style=flat-square|${BADGE_URL}|" README.md
# Commit and push the update
# Set up git authentication and commit
git config --global user.name "CI Bot"
git config --global user.email "ci@arcodange.fr"
# Set up credentials using Gitea token
git config --global credential.helper store
echo "https://${{ secrets.PACKAGES_TOKEN }}@gitea.arcodange.lab" > ~/.git-credentials
git add README.md
git commit -m "🤖 chore: update coverage badge to ${COVERAGE}%" || echo "No coverage change to commit"
git commit -m "🤖 chore: update coverage badge to ${COVERAGE}% [skip ci]" || echo "No coverage change to commit"
git push || echo "Push failed - may be duplicate commit"
- name: Run go fmt