| 1 |
# Copyright 2022 The Archivista Contributors |
| 2 |
# |
| 3 |
# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 |
# you may not use this file except in compliance with the License. |
| 5 |
# You may obtain a copy of the License at |
| 6 |
# |
| 7 |
# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 |
# |
| 9 |
# Unless required by applicable law or agreed to in writing, software |
| 10 |
# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 |
# See the License for the specific language governing permissions and |
| 13 |
# limitations under the License. |
| 14 |
|
| 15 |
name: golangci-lint |
| 16 |
on: |
| 17 |
push: |
| 18 |
tags: |
| 19 |
- v* |
| 20 |
branches: |
| 21 |
- master |
| 22 |
- main |
| 23 |
pull_request: |
| 24 |
permissions: |
| 25 |
contents: read |
| 26 |
pull-requests: read |
| 27 |
jobs: |
| 28 |
golangci: |
| 29 |
name: lint |
| 30 |
runs-on: ubuntu-latest |
| 31 |
steps: |
| 32 |
- name: Harden Runner |
| 33 |
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1 |
| 34 |
with: |
| 35 |
egress-policy: audit |
| 36 |
|
| 37 |
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 |
| 38 |
|
| 39 |
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 |
| 40 |
with: |
| 41 |
go-version-file: "go.mod" |
| 42 |
|
| 43 |
- name: golangci-lint |
| 44 |
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0 |
| 45 |
with: |
| 46 |
version: latest |
| 47 |
args: --timeout=3m |