Update GitHub Actions (bump versions, improve naming a bit) #6
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: Run lints | |
on: | |
push: | |
tags: | |
- v3.* | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
permissions: | |
contents: read | |
jobs: | |
staticcheck: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.20" | |
- name: Clone repository | |
uses: actions/checkout@v4 | |
- name: Set up staticcheck | |
run: go install honnef.co/go/tools/cmd/staticcheck@latest | |
- name: Run staticcheck | |
run: staticcheck ./... | |
golangci-lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.20" | |
- name: Clone repository | |
uses: actions/checkout@v4 | |
- name: Run golangci-lint | |
uses: golangci/golangci-lint-action@v5 | |
with: | |
version: latest |