chore: Install tools if cache restore fails #5321
Workflow file for this run
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: "golangci-lint" | |
on: | |
pull_request: | |
paths-ignore: | |
- 'website/**' | |
permissions: | |
contents: read | |
jobs: | |
lint: | |
name: "Run Linter" | |
runs-on: ${{ fromJSON(vars.RUNNER) }} | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
fetch-depth: '0' | |
- name: Determine Go version | |
id: get-go-version | |
# We use .go-version as our source of truth for current Go | |
# version, because "goenv" can react to it automatically. | |
run: | | |
echo "Building with Go $(cat .go-version)" | |
echo "go-version=$(cat .go-version)" >> "$GITHUB_OUTPUT" | |
- name: Set up Go | |
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 | |
with: | |
go-version: "${{ steps.get-go-version.outputs.go-version }}" | |
- name: Install Dependencies | |
# if we really need to we can update this to run `make tools` | |
# later but its just not necessary to only run linters | |
run: | | |
make golangci-lint | |
- name: Running Linters | |
run: | | |
LINT_DIFF_BRANCH="origin/${GITHUB_BASE_REF}" make lint-diff |