-
Notifications
You must be signed in to change notification settings - Fork 4
51 lines (44 loc) · 1.71 KB
/
linting.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
---
name: "🧪 Linting checks"
# yamllint disable-line rule:truthy
on:
workflow_dispatch:
pull_request:
types:
[opened, reopened, edited]
jobs:
lint:
name: "Check repository content"
runs-on: ubuntu-latest
steps:
- name: "Checkout repository"
uses: actions/checkout@v3
- name: "Checking YAML files (yamllint)"
if: always()
run: |
pip install yamllint
yamllint .
# - name: "Checking TOML files (gh-action-toml-linter)"
# if: always()
# uses: yisonPylkita/[email protected]
- name: "Checking GitHub Actions (actionlint)"
if: always()
id: actionlint
uses: raven-actions/actionlint@v1
with:
matcher: true # optional
cache: true # optional
fail-on-error: true # optional
files: ".github/workflows/*.yaml, .github/workflows/*.yml"
# flags: "-ignore SC2086" # optional
- name: "Problem report (conditional step)"
if: ${{ steps.actionlint.outputs.exit-code != 0 }}
# yamllint disable rule:line-length
run: |
echo "Used actionlint version ${{ steps.actionlint.outputs.version-semver }}"
echo "Used actionlint release ${{ steps.actionlint.outputs.version-tag }}"
echo "actionlint ended with ${{ steps.actionlint.outputs.exit-code }} exit code"
echo "actionlint ended because '${{ steps.actionlint.outputs.exit-message }}'"
echo "actionlint found ${{ steps.actionlint.outputs.total-errors }} errors"
echo "actionlint checked ${{ steps.actionlint.outputs.total-files }} files"
echo "actionlint cache used: ${{ steps.actionlint.outputs.cache-hit }}"