Skip to content

Commit 00f182b

Browse files
committed
.github/workflows: .github/workflows: fix emitting a failure in go-generate-check
1 parent 0e79bc9 commit 00f182b

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

.github/workflows/go-generate-check.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ jobs:
1010
uses: actions/setup-go@v2
1111
with:
1212
go-version: ^1.16
13-
1413
- name: Check out code into the Go module directory
1514
uses: actions/checkout@v2
1615
- name: Install deps
@@ -40,7 +39,12 @@ jobs:
4039
id: git-check
4140
run: |
4241
if ! git diff-index --quiet HEAD --; then
42+
echo "changes_exist=true" >> $GITHUB_ENV
4343
git status
44-
45-
core.setFailed('Please run \"go generate ./...\" to update codebase')
46-
fi
44+
fi
45+
- name: Check coverage tolerance
46+
if: env.changes_exist == 'true'
47+
uses: actions/github-script@v3
48+
with:
49+
script: |
50+
core.setFailed("Please run 'go generate ./...' to update codebase")

0 commit comments

Comments
 (0)