Skip to content

Commit

Permalink
Merge pull request #159 from smallstep/panos/skip-go-generate
Browse files Browse the repository at this point in the history
goLint: allow callers to skip code generation check
  • Loading branch information
azazeal authored Dec 2, 2024
2 parents 1a2eb4a + 42a9248 commit 218031e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/goLint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
required: false
type: string
default: '--timeout=30m'
skip-go-generate:
required: false
type: boolean
default: false
secrets:
SSH_PRIVATE_KEY:
required: false
Expand Down Expand Up @@ -66,7 +70,7 @@ jobs:
args: '${{ inputs.golangci-lint-args }}'
skip-cache: true
- name: Run go generate
if: success() || failure() # run this step even if the previous one failed
if: ( success() || failure() ) && !inputs.skip-go-generate
run: |
# delete all go-generated files (that adhere to the comment convention); protobuf code is excluded, because its output is (currently) not fully controlled by tools.go
git ls-files -z | grep --include \*.go --exclude \*.pb.go -lrIZ "^// Code generated .* DO NOT EDIT\.$" | tr '\0' '\n' | xargs rm -f
Expand Down

0 comments on commit 218031e

Please sign in to comment.