Skip to content

Commit

Permalink
ci: Add input
Browse files Browse the repository at this point in the history
  • Loading branch information
chloe463 committed Dec 12, 2024
1 parent e1a4f48 commit 3f0de15
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/reusable-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Reusable workflow example

on:
workflow_call:
inputs:
default-base-branch:
required: true
type: string
secrets:
NPM_TOKEN:
required: true
Expand Down Expand Up @@ -33,6 +37,6 @@ jobs:

- name: Run ESLint
run: |
BASE_BRANCH=${GITHUB_BASE_REF:-master}
BASE_BRANCH=${GITHUB_BASE_REF:-${{ inputs.default-base-branch }}}
BASE_COMMIT=$(git merge-base HEAD origin/${BASE_BRANCH})
yarn lint-staged --concurrent=false --diff="${BASE_COMMIT}..HEAD" --verbose

0 comments on commit 3f0de15

Please sign in to comment.