Skip to content

Commit 3f0de15

Browse files
committed
ci: Add input
1 parent e1a4f48 commit 3f0de15

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/reusable-lint.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: Reusable workflow example
22

33
on:
44
workflow_call:
5+
inputs:
6+
default-base-branch:
7+
required: true
8+
type: string
59
secrets:
610
NPM_TOKEN:
711
required: true
@@ -33,6 +37,6 @@ jobs:
3337

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

0 commit comments

Comments
 (0)