From 3ab43f743d52b6d67a399f1ec67b38199e404aa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CClems=E2=80=9D?= Date: Wed, 6 Nov 2024 21:30:57 +0100 Subject: [PATCH] user id test --- .github/workflows/workflow.yml | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 566795c2..aaf84a22 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -1,11 +1,3 @@ -# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven - -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. - name: 'Quarkus CI with Maven' on: @@ -43,6 +35,23 @@ jobs: - name: Log coverage percentage run: | - echo "GitHub User ID: ${GITHUB_ACTOR}" echo "coverage = ${{ steps.jacoco.outputs.coverage }}" - echo "branch coverage = ${{ steps.jacoco.outputs.branches }}" \ No newline at end of file + echo "branch coverage = ${{ steps.jacoco.outputs.branches }}" + + - name: Commit and push + if: ${{ github.event_name != 'pull_request' }} + run: | + cd .github/badges + if [[ `git status --porcelain *.svg` ]]; then + git config user.name "${{ github.actor }}" + git config user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com" + git add *.svg + git commit -m "Autogenerated JaCoCo coverage badge" *.svg + git push + fi + + - name: Upload Jacoco coverage report + uses: actions/upload-artifact@v4 + with: + name: jacoco-report + path: target/site/jacoco/ \ No newline at end of file