-
Notifications
You must be signed in to change notification settings - Fork 12
44 lines (40 loc) · 1.27 KB
/
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
name: "lint"
on:
pull_request:
types: ["opened", "reopened", "synchronize"]
push:
schedule:
# Run at midnight UTC every day with 15 minutes delay added to avoid high load periods
- cron: "15 0 * * *"
workflow_dispatch:
permissions:
# So the workflow can cancel in-progress jobs
actions: "write"
concurrency:
group: "${{github.workflow}}-${{github.ref}}"
# Cancel in-progress jobs for efficiency
cancel-in-progress: true
jobs:
lint-check:
runs-on: "ubuntu-latest"
env:
STYLELINT_MATCHER_OWNER: "stylelint"
STYLELINT_MATCHER_PATH: "./.github/problem-matchers/stylelint.json"
steps:
- uses: "actions/checkout@v4"
with:
submodules: "recursive"
- uses: "actions/setup-node@v4"
with:
node-version: 22
- run: "npm clean-install"
- name: "Set up Stylelint Problem Matcher"
run: "echo '::add-matcher::${{env.STYLELINT_MATCHER_PATH}}'"
- name: "Run `lint:check` script."
run: |-
# Disable ANSI color codes in Stylelint default "string" formatter
export NO_COLOR=1
npm run lint:check
- if: "always()"
name: "Remove Stylelint Problem Matcher"
run: "echo '::remove-matcher owner=${{env.STYLELINT_MATCHER_OWNER}}::'"