-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (54 loc) · 1.44 KB
/
lint.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
name: lint
on:
pull_request:
branches: [ main ]
permissions:
contents: read
jobs:
sh:
name: simple-shell-syntax-check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v43
with:
files: |
**.sh
- uses: Klintrup/simple-shell-syntax-check@v2
if: steps.changed-files.outputs.any_changed == 'true'
with:
files: ${{ steps.changed-files.outputs.all_changed_and_modified_files }}
install_missing_shell: true
shellcheck:
name: shellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@2.0.0
prettier:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v43
with:
files: |
**.md
- name: Prettify code
if: steps.changed-files.outputs.any_changed == 'true'
uses: creyD/prettier_action@v4.3
with:
prettier_options: --write ${{ steps.changed-files.outputs.all_changed_files }}