2023-04-17 22:38:24 +00:00
|
|
|
name: golangci-lint
|
|
|
|
on:
|
|
|
|
# For now, only lint pull requests, not the main branches.
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
# TODO(andrew): enable for main branch after an initial waiting period.
|
|
|
|
#push:
|
|
|
|
# branches:
|
|
|
|
# - main
|
|
|
|
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
pull-requests: read
|
|
|
|
|
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
golangci:
|
|
|
|
name: lint
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-09-04 21:37:58 +00:00
|
|
|
- uses: actions/checkout@v4
|
2023-04-17 22:38:24 +00:00
|
|
|
|
2023-04-24 11:57:24 +00:00
|
|
|
- uses: actions/setup-go@v4
|
2023-04-17 22:38:24 +00:00
|
|
|
with:
|
|
|
|
go-version-file: go.mod
|
|
|
|
cache: false
|
|
|
|
|
|
|
|
- name: golangci-lint
|
2024-08-22 03:00:31 +00:00
|
|
|
# Note: this is the 'v6.1.0' tag as of 2024-08-21
|
|
|
|
uses: golangci/golangci-lint-action@aaa42aa0628b4ae2578232a66b541047968fac86
|
2023-04-17 22:38:24 +00:00
|
|
|
with:
|
2024-08-22 03:00:31 +00:00
|
|
|
version: v1.60
|
2023-04-17 22:38:24 +00:00
|
|
|
|
|
|
|
# Show only new issues if it's a pull request.
|
|
|
|
only-new-issues: true
|