-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (49 loc) · 1.73 KB
/
linter.yaml
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
# yamllint disable rule:comments
---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Run all the linters
'on':
workflow_call:
workflow_dispatch:
push:
jobs:
lint:
name: Run linters
runs-on: ubuntu-latest
steps:
- name: Generate Token
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
id: generate-token
with:
app_id: "${{ secrets.BOT_APP_ID }}"
private_key: "${{ secrets.BOT_APP_PRIVATE_KEY }}"
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
token: "${{ steps.generate-token.outputs.token }}"
fetch-depth: 1
- name: Setup CUE
uses: cue-lang/setup-cue@a93fa358375740cd8b0078f76355512b9208acb1 # v1.0.1
- name: "Linter: CUE"
shell: bash
run: |-
cue vet --schema '#Spec' ./apps/*/metadata.json ./metadata.rules.cue
- name: "Linter: hadolint"
uses: jbergstroem/hadolint-gh-action@39e57273ed8f513872326b228217828be6a42730 # v1.12.2
with:
annotate: true
dockerfile: "apps/*/Dockerfile"
error_level: 1
- name: "Linter: shellcheck"
uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38 # 2.0.0
with:
severity: warning
- name: "Linter: yamllint"
uses: karancode/yamllint-github-action@fdef6bc189425ecc84cc4543b2674566c0827053 # v2.1.1
with:
yamllint_strict: true
yamllint_config_filepath: ./.yamllint
yamllint_comment: true
env:
GITHUB_ACCESS_TOKEN: "${{ steps.generate-token.outputs.token }}"
# yamllint enable rule:comments