Skip to content

Commit

Permalink
.github/workflows: .github/workflows: .github/workflows: fix emitting…
Browse files Browse the repository at this point in the history
… a failure in go-generate-check
  • Loading branch information
ziogaschr committed Jan 11, 2023
1 parent 0e79bc9 commit c4b7520
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/go-generate-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ jobs:
uses: actions/setup-go@v2
with:
go-version: ^1.16

- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Install deps
Expand Down Expand Up @@ -40,7 +39,12 @@ jobs:
id: git-check
run: |
if ! git diff-index --quiet HEAD --; then
echo "changes_exist=true" >> $GITHUB_ENV
git status
core.setFailed('Please run \"go generate ./...\" to update codebase')
fi
fi
- name: Fail if modified files exist
if: env.changes_exist == 'true'
uses: actions/github-script@v3
with:
script: |
core.setFailed("Please run 'go generate ./...' to update codebase")

0 comments on commit c4b7520

Please sign in to comment.