Repository navigation
Merge branch 'main' into marc/ci-release-artifact-checks #6100
Workflow file for this run
This file contains hidden or 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: Go Lint | |
| on: | |
| workflow_dispatch: | |
| push: | |
| jobs: | |
| go-lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Get Go version from mise | |
| id: mise | |
| run: echo "go-version=$(grep 'golang' mise.toml | cut -d'"' -f2)" >> $GITHUB_OUTPUT | |
| - name: Set up Go | |
| uses: actions/setup-go@v7 | |
| with: | |
| go-version: ${{ steps.mise.outputs.go-version }} | |
| # See go-ci.yml for why the built-in cache is off. | |
| cache: false | |
| - name: Find Go cache directories | |
| id: go-cache | |
| run: | | |
| echo "build=$(go env GOCACHE)" >> "$GITHUB_OUTPUT" | |
| echo "modules=$(go env GOMODCACHE)" >> "$GITHUB_OUTPUT" | |
| - name: Cache Go modules, build output, and golangci-lint analysis | |
| uses: actions/cache@v6 | |
| with: | |
| path: | | |
| ${{ steps.go-cache.outputs.modules }} | |
| ${{ steps.go-cache.outputs.build }} | |
| ~/.cache/golangci-lint | |
| key: ${{ github.job }}-${{ runner.os }}-${{ runner.arch }}-go${{ steps.mise.outputs.go-version }}-${{ hashFiles('**/go.sum') }} | |
| restore-keys: | | |
| ${{ github.job }}-${{ runner.os }}-${{ runner.arch }}-go${{ steps.mise.outputs.go-version }}- | |
| - run: ./dev/go-lint.sh |