Add lint workflow #2
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: "go-linter" | |
on: | |
pull_request: | |
merge_group: | |
workflow_dispatch: | |
jobs: | |
lint: | |
strategy: | |
fail-fast: false | |
runs-on: ubuntu-latest-xl | |
env: | |
GOPROXY: https://goproxy.githubapp.com/mod,https://proxy.golang.org/,direct | |
GOPRIVATE: "" | |
GONOPROXY: "" | |
GONOSUMDB: github.com/github/* | |
steps: | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ vars.GOVERSION }} | |
check-latest: true | |
- uses: actions/checkout@v4 | |
- name: Configure Go private module access | |
run: | | |
echo "machine goproxy.githubapp.com login nobody password ${{ secrets.GOPROXY_TOKEN }}" >> $HOME/.netrc | |
- name: Lint | |
# This also does checkout, setup-go, and proxy setup. | |
uses: github/[email protected] | |
with: | |
strict: true | |
go-version: ${{ vars.GOVERSION }} | |
goproxy-token: ${{secrets.GOPROXY_TOKEN}} |