Skip to content

Commit b736429

Browse files
committed
feat: Add reusable workflow to run eslint
1 parent a695f01 commit b736429

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Reusable workflow example
2+
3+
on:
4+
workflow_call:
5+
# inputs:
6+
# config-path:
7+
# required: true
8+
# type: string
9+
# secrets:
10+
# token:
11+
# required: true
12+
13+
jobs:
14+
lint:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version-file: ".node-version"
21+
cache: "yarn"
22+
- name: Run ESLint
23+
run: |
24+
BASE_BRANCH=${GITHUB_BASE_REF:-master}
25+
BASE_COMMIT=$(git merge-base HEAD origin/${BASE_BRANCH})
26+
yarn lint-staged --concurrent=false --diff="${BASE_COMMIT}..HEAD" --verbose

0 commit comments

Comments
 (0)