Merge pull request #1239 from tektoncd/dependabot/go_modules/all-3fe2… #1511
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: goclean | |
on: | |
push: | |
paths: | |
- '**.go' | |
- 'go.mod' | |
- 'go.sum' | |
branches: | |
- main | |
- release-* | |
pull_request: | |
paths: | |
- '**.go' | |
- 'go.mod' | |
- 'go.sum' | |
branches: | |
- main | |
- release-* | |
schedule: | |
- cron: '41 20 * * 1' | |
jobs: | |
goclean: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@6d193bf28034eafb982f37bd894289fe649468fc # v4.1.7 | |
- name: Setup Go | |
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | |
with: | |
go-version: '1.22' | |
- name: go vet | |
run: | | |
# Use in-place vendored dependencies. | |
go vet -mod=vendor ./... | |
# If this workflow fails, run `go fmt` on your tree and resubmit. | |
# We ignore vendor/ files whose format we don't control. | |
- name: go fmt | |
run: if [ "$(gofmt -l . | grep -v vendor/ | grep -v third_party/ | wc -l)" -gt 0 ]; then exit 1; fi |