From 9886396f536f2fe7e199e0075902365dd09a4ce7 Mon Sep 17 00:00:00 2001 From: pierresomny Date: Wed, 7 Feb 2024 15:16:28 +0100 Subject: [PATCH] fix: try to fix github action Signed-off-by: pierresomny --- .github/workflows/test.yaml | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index c6344a5..d6f7b3e 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -13,24 +13,18 @@ jobs: - name: Generate JaCoCo Badge id: jacoco uses: cicirello/jacoco-badge-generator@v2 - with: - generate-branches-badge: true - name: Log coverage percentage run: | echo "coverage = ${{ steps.jacoco.outputs.coverage }}" echo "branch coverage = ${{ steps.jacoco.outputs.branches }}" - - name: Commit and push the badge (if it changed) - uses: EndBug/add-and-commit@v9.1.4 - with: - message: 'commit badge' - add: '*.svg' - author_email: "somny.p@feir.com" - author_name: "pierresomny" - - - name: Upload JaCoCo coverage report - uses: actions/upload-artifact@v2 - with: - name: jacoco-report - path: target/site/jacoco/ \ No newline at end of file + - name: Commit the badge (if it changed) + run: | + if [[ `git status --porcelain` ]]; then + git config --global user.name 'pierresomny' + git config --global user.email 'somny.p@sfeir.com' + git add -A + git commit -m "Autogenerated JaCoCo coverage badge" + git push + fi