-
Notifications
You must be signed in to change notification settings - Fork 6
77 lines (68 loc) · 2.07 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
75
76
77
name: actionlint
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
on:
pull_request:
branches:
- develop
- dev-[2-9][0-9].[0-9][0-9].x
- master
- "[2-9][0-9].[0-9][0-9].x"
- hotfix-*
- release-*
paths:
- ".github/**"
jobs:
actionlint:
runs-on: ubuntu-22.04
steps:
- name: Checkout sources
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- 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|collect|collect-arm64)" 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@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- 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/actions/ ./.github/workflows/