@@ -9,31 +9,82 @@ concurrency:
99 cancel-in-progress : true
1010
1111jobs :
12- pre-commit :
13- name : Run pre-commit
12+ actionlint :
1413 runs-on : ubuntu-latest
1514
16- permissions :
17- contents : read
15+ steps :
16+ - name : Checkout
17+ uses : actions/checkout@v6
18+ with :
19+ fetch-depth : 0
20+
21+ - name : Run actionlint via pre-commit + reviewdog
22+ uses : leinardi/gha-pre-commit-actionlint-reviewdog@v1
23+ with :
24+ from-ref : ${{ github.event.pull_request.base.sha }}
25+ to-ref : ${{ github.event.pull_request.head.sha }}
26+ github-token : ${{ secrets.GITHUB_TOKEN }}
27+
28+ pre-commit-hooks :
29+ runs-on : ubuntu-latest
30+
31+ steps :
32+ - name : Checkout
33+ uses : actions/checkout@v6
34+ with :
35+ fetch-depth : 0
36+
37+ - name : Run pre-commit hooks + reviewdog diff
38+ uses : leinardi/gha-pre-commit-hooks-reviewdog@v1
39+ with :
40+ from-ref : ${{ github.event.pull_request.base.sha }}
41+ to-ref : ${{ github.event.pull_request.head.sha }}
42+ github-token : ${{ secrets.GITHUB_TOKEN }}
43+
44+ markdownlint :
45+ runs-on : ubuntu-latest
1846
1947 steps :
2048 - name : Checkout
2149 uses : actions/checkout@v6
50+ with :
51+ fetch-depth : 0
52+
53+ - name : Run markdownlint-cli2 via pre-commit + reviewdog
54+ uses : leinardi/gha-pre-commit-markdownlint-cli2-reviewdog@v1
55+ with :
56+ from-ref : ${{ github.event.pull_request.base.sha }}
57+ to-ref : ${{ github.event.pull_request.head.sha }}
58+ github-token : ${{ secrets.GITHUB_TOKEN }}
2259
23- - name : Set up Python
24- uses : actions/setup-python@v6
60+ shellcheck :
61+ runs-on : ubuntu-latest
62+
63+ steps :
64+ - name : Checkout
65+ uses : actions/checkout@v6
2566 with :
26- python-version : " 3.x "
67+ fetch-depth : 0
2768
28- - name : Cache pre-commit
29- uses : actions/cache@v4
69+ - name : Run shellcheck via pre-commit + reviewdog
70+ uses : leinardi/gha-pre-commit-shellcheck-reviewdog@v1
3071 with :
31- path : ~/.cache/pre-commit
32- key : pre-commit|${{ runner.os }}|${{ hashFiles('.pre-commit-config.yaml') }}
72+ from-ref : ${{ github.event.pull_request.base.sha }}
73+ to-ref : ${{ github.event.pull_request.head.sha }}
74+ github-token : ${{ secrets.GITHUB_TOKEN }}
75+
76+ yamllint :
77+ runs-on : ubuntu-latest
3378
34- - name : Install pre-commit
35- run : pip install --no-cache-dir pre-commit
79+ steps :
80+ - name : Checkout
81+ uses : actions/checkout@v6
82+ with :
83+ fetch-depth : 0
3684
37- - name : Run pre-commit on all files
38- run : pre-commit run --all-files --show-diff-on-failure
39- # If pre-commit returns non-zero, this step (and job) will fail automatically
85+ - name : Run yamllint via pre-commit + reviewdog
86+ uses : leinardi/gha-pre-commit-yamllint-reviewdog@v1
87+ with :
88+ from-ref : ${{ github.event.pull_request.base.sha }}
89+ to-ref : ${{ github.event.pull_request.head.sha }}
90+ github-token : ${{ secrets.GITHUB_TOKEN }}
0 commit comments