Core

/.github/workflows/lint.yml (1.4 KB)

 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: lint
on:
push:
tags:
- "*"
branches:
- main
- master
pull_request:
branches: [ main, master ]
permissions:
contents: read
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- name: "Golang"
uses: "actions/setup-go@v2"
with:
go-version: "{{{ .GoVersionSafe }}}"
- name: checkout
uses: actions/checkout@v2
- name: "Dependencies"
run: "bin/bootstrap.sh"
- name: "Config"
env:
OWNER: "${{ github.repository_owner }}"
TOKEN: "${{ secrets.CR_PAT }}"
run: "git config --global url.\"https://${OWNER}:${TOKEN}@github.com\".insteadOf \"https://github.com\""
- name: "Templates"
run: "bin/templates.sh"
- name: "Modules"
run: "go mod download"
env:
GOPRIVATE: "github.com/${{ github.repository_owner }}"
GITHUB_TOKEN: "${{ secrets.CR_PAT }}"
OWNER: "${{ github.repository_owner }}"
TOKEN: "${{ secrets.CR_PAT }}"
- name: "Lint"
uses: golangci/golangci-lint-action@v2
with:
version: "latest"
skip-go-installation: true
skip-pkg-cache: true
skip-build-cache: true
args: "--timeout=10m --issues-exit-code=0 --max-issues-per-linter=0 --sort-results ./..."