Merge pull request #515 from openinfradev/minor_fix #1403
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: Lint | |
on: | |
push: | |
tags: | |
- v* | |
branches: | |
- main | |
- develop | |
- release | |
pull_request: | |
branches: | |
- main | |
- develop | |
- release | |
jobs: | |
golangci: | |
name: lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: "1.21" | |
cache: false | |
- name: Install golangci-lint | |
# Install golangci-lint from source instead of using | |
# golangci-lint-action to ensure the golangci-lint binary is built with | |
# the same Go version we're targeting. | |
# Avoids incompatibility issues such as: | |
# - https://github.com/golangci/golangci-lint/issues/2922 | |
# - https://github.com/golangci/golangci-lint/issues/2673 | |
# - https://github.com/golangci/golangci-lint-action/issues/442 | |
run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.56.2 | |
- name: Run golangci-lint | |
run: golangci-lint run --verbose --out-format=github-actions |