From 968661b3ce8383cd88ee0f6d0f39edd088907211 Mon Sep 17 00:00:00 2001 From: Duncan Tourolle Date: Sat, 7 Jun 2025 15:55:46 +0200 Subject: [PATCH] ci changes --- .gitea/workflows/ci.yml | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 30f974d..a6107f3 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -91,10 +91,26 @@ jobs: python -c "import pyWebLayout; print('Package imported successfully')" - name: Commit coverage badges - if: github.ref == 'refs/heads/main' + if: github.ref == 'refs/heads/master' run: | + echo "Current directory contents:" + ls -la *.svg || echo "No SVG files found" + echo "Checking if coverage files exist:" + ls -la coverage* || echo "No coverage files found" + git config --local user.email "action@gitea.local" git config --local user.name "Gitea Action" - git add coverage*.svg - git diff --staged --quiet || git commit -m "Update coverage badges [skip ci]" - git push \ No newline at end of file + + if ls coverage*.svg 1> /dev/null 2>&1; then + echo "Adding coverage badge files..." + git add coverage*.svg + if git diff --staged --quiet; then + echo "No changes to commit" + else + echo "Committing badge updates..." + git commit -m "Update coverage badges [skip ci]" + git push + fi + else + echo "No coverage SVG files found to commit" + fi \ No newline at end of file