diff --git a/.gitea/workflows/ci-cd.yaml b/.gitea/workflows/ci-cd.yaml index 6d48bf4..596e24f 100644 --- a/.gitea/workflows/ci-cd.yaml +++ b/.gitea/workflows/ci-cd.yaml @@ -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