Skip to content

Commit 994c3ac

Browse files
committed
Add stylelinter
1 parent 979ae1c commit 994c3ac

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/stylelinter.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
3+
on: # yamllint disable-line rule:truthy
4+
workflow_call:
5+
inputs:
6+
repository:
7+
description: 'The repository that needs linting'
8+
type: string
9+
default: ${{ github.repository }}
10+
required: false
11+
ref:
12+
description: 'The branch, tag or SHA that needs linting'
13+
type: string
14+
required: false
15+
default: ${{ github.ref }}
16+
pattern:
17+
description: 'The file-pattern to match files that are being linted'
18+
type: string
19+
required: false
20+
default: '**/*.{css,scss,sass}'
21+
config_file:
22+
description: 'The location of the linter-configuration'
23+
type: string
24+
required: false
25+
default: 'tools/linters/.stylelintrc.json'
26+
27+
jobs:
28+
linter:
29+
runs-on: ubuntu-latest
30+
31+
steps:
32+
- name: Checkout Code
33+
uses: actions/checkout@v4
34+
with:
35+
fetch-depth: 0
36+
repository: ${{ inputs.repository }}
37+
ref: ${{ inputs.ref }}
38+
39+
- name: Lint stylesheets
40+
uses: actions-hub/stylelint@v1.1.6
41+
env:
42+
PATTERN: ${{ inputs.pattern }}
43+
INDENT_SPACES: 2
44+
CONFIG_PATH: ${{ inputs.config_file }}

0 commit comments

Comments
 (0)