| 1 |
name: golangci-lint |
| 2 |
|
| 3 |
on: |
| 4 |
push: |
| 5 |
branches: |
| 6 |
- master |
| 7 |
pull_request: |
| 8 |
branches: |
| 9 |
- master |
| 10 |
|
| 11 |
concurrency: |
| 12 |
group: ${{ github.workflow }}-${{ github.ref }} |
| 13 |
cancel-in-progress: true |
| 14 |
|
| 15 |
permissions: |
| 16 |
contents: read |
| 17 |
pull-requests: read |
| 18 |
|
| 19 |
jobs: |
| 20 |
golangci: |
| 21 |
name: lint |
| 22 |
runs-on: ubuntu-latest |
| 23 |
steps: |
| 24 |
- name: Harden Runner |
| 25 |
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 |
| 26 |
with: |
| 27 |
disable-sudo: true |
| 28 |
egress-policy: block |
| 29 |
allowed-endpoints: > |
| 30 |
api.github.com:443 |
| 31 |
github.com:443 |
| 32 |
golangci-lint.run:443 |
| 33 |
objects.githubusercontent.com:443 |
| 34 |
release-assets.githubusercontent.com:443 |
| 35 |
proxy.golang.org:443 |
| 36 |
raw.githubusercontent.com:443 |
| 37 |
storage.googleapis.com:443 |
| 38 |
sum.golang.org:443 |
| 39 |
|
| 40 |
- name: Set up Go |
| 41 |
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c |
| 42 |
with: |
| 43 |
go-version: '1.24' |
| 44 |
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 |
| 45 |
- name: golangci-lint |
| 46 |
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 |
| 47 |
with: |
| 48 |
version: v2.1.1 |
| 49 |
only-new-issues: true |