Skip to content

Commit 05600cb

Browse files
committed
ci: Update coverage badge when not PR 👷
1 parent 6ab5547 commit 05600cb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎.github/workflows/ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ jobs:
3232
set -euo pipefail
3333
go test -json -race -covermode=atomic -coverprofile=coverage.out ./... 2>&1 | tee /tmp/gotest.log | gotestfmt
3434
echo "COVERAGE=$(cat /tmp/gotest.log | sed -nr "s/.*coverage:.([0-9.]+).*/\1/p" | uniq)" >> $GITHUB_ENV
35-
- name: Update coverage
35+
echo "Coverage is: ${{ env.COVERAGE }}%"
36+
37+
- name: Update coverage badge
3638
uses: cybercinch/dynamic-badges-action@master
3739
with:
3840
auth: ${{ secrets.BADGE_API_TOKEN }}
@@ -42,6 +44,7 @@ jobs:
4244
minColorRange: 50
4345
maxColorRange: 90
4446
valColorRange: ${{ env.COVERAGE }}
47+
if: github.event_name != 'pull_request'
4548
build:
4649
runs-on: ${{ matrix.os }}
4750
needs:

0 commit comments

Comments
 (0)