mirror of
https://github.com/jnMetaCode/superpowers-zh.git
synced 2026-09-03 07:23:56 +08:00
fix: CI should validate SKILL.md instead of arbitrary .md files (#2)
The validation step used `find ... -name '*.md' | head -1` to pick the first .md file in each skill directory. On Linux (GitHub Actions), `find` returns files in inode order — not alphabetical — so auxiliary files like CREATION-LOG.md or code-quality-reviewer-prompt.md could be picked instead of SKILL.md. These auxiliary files have no frontmatter, causing 4 false-positive validation errors on every CI run. Fix: directly target SKILL.md (the canonical skill definition file) and error if it's missing rather than silently skipping.
This commit is contained in:
7
.github/workflows/ci.yml
vendored
7
.github/workflows/ci.yml
vendored
@@ -23,9 +23,10 @@ jobs:
|
||||
run: |
|
||||
ERRORS=0
|
||||
for dir in skills/*/; do
|
||||
SKILL_FILE=$(find "$dir" -maxdepth 1 -name '*.md' | head -1)
|
||||
if [ -z "$SKILL_FILE" ]; then
|
||||
echo "::warning::No .md file in $dir"
|
||||
SKILL_FILE="${dir}SKILL.md"
|
||||
if [ ! -f "$SKILL_FILE" ]; then
|
||||
echo "::error::Missing SKILL.md in $dir"
|
||||
ERRORS=$((ERRORS + 1))
|
||||
continue
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user