-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (44 loc) · 1.27 KB
/
simple-lint.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: Simple Linter and Formatter
on:
pull_request:
types: [opened, synchronize, reopened]
workflow_call:
inputs:
runPrettier:
default: true
type: boolean
secrets:
PAT_ACTION_CI:
required: true
jobs:
prettier:
name: Prettier Check
if: ${{ inputs.runPrettier }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.PAT_ACTION_CI }}
- uses: actionsx/prettier@v2
with:
# prettier CLI arguments.
args: --write .
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_user_name: amutechtest
commit_user_email: amu_deploy@amuniversal.com
commit_message: Apply prettier changes
lint-workflows:
name: Workflow linter
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download actionlint
id: get_actionlint
run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
shell: bash
- name: Lint workflow files
run: ${{ steps.get_actionlint.outputs.executable }} -color -ignore "SC2086" -ignore "SC2129"
shell: bash