Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions scripts/actionlint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,16 @@ echo
cd "$REPO_ROOT" || exit 1

# If a repo has it's own action lint config, use that. Otherwise, use the one in this repo.
# Note: we've already cd'd into $REPO_ROOT above, so use paths relative to cwd.
CONFIG=""
if [[ ! -f "$REPO_ROOT/.github/actionlint.yml" ]] && [[ ! -f "$REPO_ROOT/.github/actionlint.yaml" ]]; then
if [[ ! -f ".github/actionlint.yml" ]] && [[ ! -f ".github/actionlint.yaml" ]]; then
CONFIG=" -config-file $(readlink -f "$SCRIPT_DIR"/../.github/actionlint.yml)"
info "Using default Github-Actions repo actionlint.yml" >&2
else
if [[ -f "$REPO_ROOT/.github/actionlint.yml" ]]; then
CONFIG=" -config-file $(readlink -f "$REPO_ROOT/.github/actionlint.yml")"
elif [[ -f "$REPO_ROOT/.github/actionlint.yaml" ]]; then
CONFIG=" -config-file $(readlink -f "$REPO_ROOT/.github/actionlint.yaml")"
else
if [[ -f ".github/actionlint.yml" ]]; then
CONFIG=" -config-file $(readlink -f ".github/actionlint.yml")"
elif [[ -f ".github/actionlint.yaml" ]]; then
CONFIG=" -config-file $(readlink -f ".github/actionlint.yaml")"
else
error "Should be unreachable -- previously found a valid local actionlint but cannot find it now..."
exit 1
Expand Down