diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 41510ca..c01bc6c 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -25,8 +25,7 @@ jobs: steps: - uses: actions/checkout@v4 - with: - ref: master + with: fetch-depth: 0 - name: Setup .NET uses: actions/setup-dotnet@v4 @@ -56,16 +55,17 @@ jobs: -targetdir:./vomark-redux.Tests/$REPORT_DEST/reports \ -reporttypes:textsummary + - name: Set user config + run: | + git config user.name "github-actions" + git config user.email "actions@github.com" + - name: Get line coverage id: coverage run: | COVERAGE=$(grep "Line coverage" ./vomark-redux.Tests/${REPORT_DEST}/reports/Summary.txt | sed -E 's/.*: ([0-9.]+)%.*/\1/') echo "coverage=$COVERAGE" >> $GITHUB_OUTPUT - - name: Set user config - run: | - git config user.name "github-actions" - git config user.email "actions@github.com" - name: Update coverage badge run: | @@ -76,12 +76,11 @@ jobs: - name: Commit badge update run: | git add -A - if git diff --cached --quiet; then echo "No changes to code coverage" else git commit -m "AUTOMATED - Updated coverage badge [skip ci]" - git push + git push origin HEAD:${GITHUB_HEAD_REF:-${GITHUB_REF_NAME}} fi diff --git a/vomark-redux.Tests/coverage/reports/Summary.txt b/vomark-redux.Tests/coverage/reports/Summary.txt index a9d26fe..26f0052 100644 --- a/vomark-redux.Tests/coverage/reports/Summary.txt +++ b/vomark-redux.Tests/coverage/reports/Summary.txt @@ -1,6 +1,6 @@ Summary - Generated on: 05/07/2026 - 19:54:05 - Coverage date: 05/07/2026 - 19:54:03 + Generated on: 05/07/2026 - 20:28:24 + Coverage date: 05/07/2026 - 20:28:21 Parser: Cobertura Assemblies: 1 Classes: 24