-
Notifications
You must be signed in to change notification settings - Fork 21
59 lines (52 loc) · 1.62 KB
/
lint.yml
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
48
49
50
51
52
53
54
55
56
57
58
59
---
name: Lint
# yamllint disable-line rule:truthy
on:
push:
tags:
- 'v*'
branches:
- main
pull_request:
permissions:
contents: read
jobs:
super-linter:
runs-on: ubuntu-22.04
steps:
- name: Checkout konvoy-image-builder repository
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: true
- name: Set environment Variables from Dotenv
uses: c-py/action-dotenv-to-setenv@v5
with:
env-file: .github/super-linter.env
- name: Run Super-Linter
uses: super-linter/super-linter@v5
env:
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# NOTE(jongiddy) super-linter is broken for Packer HCL files
# https://github.com/github/super-linter/pull/1707
# This can be removed when a release > 4.2.2 exists.
VALIDATE_TERRAGRUNT: false
# we don't need a _pedantic_ natural language linter
VALIDATE_NATURAL_LANGUAGE: false
# we use terraform to provision *test* infrastructure that is deleted
VALIDATE_TERRAFORM_TFLINT: false
VALIDATE_ALL_CODEBASE: ${{ github.event_name == 'pull_request' }}
golangci-lint:
runs-on: ubuntu-22.04
steps:
- name: Checkout konvoy-image-builder repository
uses: actions/checkout@v4
- name: golangci-lint
uses: reviewdog/action-golangci-lint@v2
with:
fail_on_error: true
reporter: github-pr-review
go_version_file: 'go.mod'