2020-12-17 01:11:22 +00:00
|
|
|
name: golangci-lint
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
2021-10-18 21:49:32 +00:00
|
|
|
- patch-*
|
2021-11-18 23:14:29 +00:00
|
|
|
paths:
|
|
|
|
- '**.go'
|
2020-12-17 01:11:22 +00:00
|
|
|
pull_request:
|
2021-11-18 23:14:29 +00:00
|
|
|
paths:
|
|
|
|
- '**.go'
|
2022-03-03 20:15:17 +00:00
|
|
|
workflow_dispatch: # Manual
|
|
|
|
|
2022-03-15 18:44:30 +00:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2020-12-17 01:11:22 +00:00
|
|
|
jobs:
|
|
|
|
golangci:
|
2022-03-15 18:44:30 +00:00
|
|
|
permissions:
|
|
|
|
contents: read # for actions/checkout to fetch code
|
|
|
|
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
|
2020-12-17 01:11:22 +00:00
|
|
|
name: lint
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-03-15 18:44:30 +00:00
|
|
|
- uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2
|
2020-12-17 01:11:22 +00:00
|
|
|
- name: golangci-lint
|
2022-03-15 18:44:30 +00:00
|
|
|
uses: golangci/golangci-lint-action@5c56cd6c9dc07901af25baab6f2b0d9f3b7c3018 # v2
|
2020-12-17 01:11:22 +00:00
|
|
|
with:
|
|
|
|
# Required: the version of golangci-lint is required and must be
|
|
|
|
# specified without patch version: we always use the latest patch
|
|
|
|
# version.
|
2021-08-24 17:35:03 +00:00
|
|
|
version: v1.42
|
2021-09-20 18:13:55 +00:00
|
|
|
args: --timeout 10m
|