Skip to content

Commit 2dba04d

Browse files
committed
fix(ci): set DEFAULT_BRANCH to current branch for super-linter
Super-linter defaults to diffing against the 'master' branch, but the shallow checkout (fetch-depth: 1) does not fetch master. This caused a FATAL error: 'Neither master, nor origin/master exist in /github/workspace'. Setting DEFAULT_BRANCH to the current branch name avoids the need for master to be present in the shallow clone.
1 parent 558f6e1 commit 2dba04d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

.github/workflows/action-super-linter.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ jobs:
4242
env:
4343
# To report GitHub Actions status checks
4444
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
DEFAULT_BRANCH: ${{ github.ref_name }}
4546
VALIDATE_BIOME_FORMAT: false
4647
VALIDATE_BIOME_LINT: false
4748
VALIDATE_GITHUB_ACTIONS_ZIZMOR: false

0 commit comments

Comments
 (0)