Skip to content

Commit 9f457ea

Browse files
authored
fix: minor update to GitHub action
1 parent c8dd489 commit 9f457ea

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

.github/workflows/lint.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,13 @@ jobs:
3535
run: chmod +x .github/scripts/lint-changed.sh
3636

3737
- name: Run lint script for changed files
38+
env:
39+
EVENT_NAME: ${{ github.event_name }}
40+
BASE_REF: ${{ github.base_ref }}
41+
BEFORE_SHA: ${{ github.event.before }}
3842
run: |
43+
# Use default string values if the GitHub Context variables are null/empty
3944
.github/scripts/lint-changed.sh \
40-
"${{ github.event_name }}" \
41-
"${{ github.base_ref || github.ref_name }}" \
42-
"${{ github.event.before }}"
45+
"${EVENT_NAME:-local}" \
46+
"${BASE_REF:-main}" \
47+
"${BEFORE_SHA:-}"

0 commit comments

Comments
 (0)