初始版本
ci / test (push) Failing after 4s

This commit is contained in:
bot
2026-11-05 03:16:36 +00:00
commit e2cf1982c1
8 changed files with 77 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
#!/usr/bin/env bash
# 用法:entrypoint.sh <files> <severity>;files 是空白分隔的路徑或萬用字元(相對於 workspace),沒有符合的檔案就略過
set -euo pipefail
cd "${GITHUB_WORKSPACE:-$PWD}"
shopt -s nullglob globstar
# shellcheck disable=SC2206 # 依空白拆開,並由 shell 展開萬用字元(不符合的萬用字元展開成空)
files=(${1:-*.sh})
if [ ${#files[@]} -eq 0 ]; then
echo "沒有符合「${1:-*.sh}」的檔案,略過 shellcheck"
exit 0
fi
echo "shellcheck(嚴重度 ${2:-warning} 以上):${files[*]}"
exec shellcheck -x -S "${2:-warning}" "${files[@]}"