2023-04-17 18:38:24 -04: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:
|
2025-01-28 15:03:13 -07:00
|
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
2023-04-17 18:38:24 -04:00
|
|
|
|
2025-01-27 12:36:04 -07:00
|
|
|
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
|
2023-04-17 18:38:24 -04:00
|
|
|
with:
|
|
|
|
go-version-file: go.mod
|
|
|
|
cache: false
|
|
|
|
|
|
|
|
- name: golangci-lint
|
2025-02-10 10:09:44 -07:00
|
|
|
uses: golangci/golangci-lint-action@2e788936b09dd82dc280e845628a40d2ba6b204c # v6.3.1
|
2023-04-17 18:38:24 -04:00
|
|
|
with:
|
2025-02-19 10:55:49 -08:00
|
|
|
version: v1.64
|
2023-04-17 18:38:24 -04:00
|
|
|
|
|
|
|
# Show only new issues if it's a pull request.
|
|
|
|
only-new-issues: true
|