Skip to content

Commit

Permalink
feat: Add reusable workflow to run eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
chloe463 committed Dec 12, 2024
1 parent a695f01 commit b736429
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/reusable-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Reusable workflow example

on:
workflow_call:
# inputs:
# config-path:
# required: true
# type: string
# secrets:
# token:
# required: true

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: ".node-version"
cache: "yarn"
- name: Run ESLint
run: |
BASE_BRANCH=${GITHUB_BASE_REF:-master}
BASE_COMMIT=$(git merge-base HEAD origin/${BASE_BRANCH})
yarn lint-staged --concurrent=false --diff="${BASE_COMMIT}..HEAD" --verbose

0 comments on commit b736429

Please sign in to comment.