-
Notifications
You must be signed in to change notification settings - Fork 112
74 lines (64 loc) · 1.96 KB
/
actionlint.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: actionlint
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
on:
pull_request:
branches:
- staging
paths:
- ".github/**"
jobs:
actionlint:
runs-on: ubuntu-22.04
steps:
- name: Checkout sources
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Download actionlint
id: get_actionlint
run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
shell: bash
- name: Check workflow files
run: |
${{ steps.get_actionlint.outputs.executable }} \
-ignore 'label "common" is unknown' \
-ignore 'label "infra" is unknown' \
-ignore 'label "veracode" is unknown' \
-ignore '"github.head_ref" is potentially untrusted' \
-shellcheck= \
-pyflakes= \
-color
shell: bash
yaml-lint:
runs-on: ubuntu-22.04
steps:
- name: Checkout sources
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Install Yaml
run: |
pip install yamllint==1.32.0
- name: Add Yaml Lint Rules
run: |
cat <<EOF >>./yamllint_rules.yml
extends: default
rules:
document-start: disable
line-length: disable
truthy:
check-keys: false
level: error
indentation:
spaces: 2
indent-sequences: true
check-multi-line-strings: false
comments:
ignore-shebangs: true
min-spaces-from-content: 1
comments-indentation: disable
new-lines:
type: unix
new-line-at-end-of-file: enable
EOF
- name: Lint YAML files
run: |
yamllint -c ./yamllint_rules.yml ./.github/workflows/