Skip to content

feat: 新スキル harden-workflows を追加 #40

feat: 新スキル harden-workflows を追加

feat: 新スキル harden-workflows を追加 #40

Workflow file for this run

name: Validate
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions: {} # deny by default — each job declares its own
concurrency:
group: validate-${{ github.ref }}
cancel-in-progress: true
jobs:
validate:
name: Validate
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read # Read repository files for validation
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Run validation
run: ./scripts/validate.sh
skills-install:
name: Skills Install
runs-on: ubuntu-latest
timeout-minutes: 10
needs: validate
permissions:
contents: read # Read repository files for install test
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
path: skills-repo
persist-credentials: false
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: '22'
- name: Create test project
run: |
mkdir -p /tmp/test-project/.github/workflows
cd /tmp/test-project
git init
git config user.email "test@test.com"
git config user.name "test"
cat <<'EOF' > .github/workflows/ci.yml
name: CI
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: echo "test"
EOF
- name: Test skills add
env:
SKILLS_REPO_PATH: skills-repo
run: |
cd /tmp/test-project
npx -y skills add "$GITHUB_WORKSPACE/$SKILLS_REPO_PATH" --yes
- name: Verify installed files match manifest
env:
SKILLS_REPO_PATH: skills-repo
run: |
cd /tmp/test-project
actual=$(find .agents/skills -type f | sed 's|^\.agents/skills/||' | sort)
expected=$(sed 's|^skills/||' "$GITHUB_WORKSPACE/$SKILLS_REPO_PATH/scripts/expected-files.txt" | sort)
if [ "$actual" = "$expected" ]; then
echo "✓ Installed files match expected manifest"
else
echo "✗ File mismatch"
echo "--- expected ---"
echo "$expected"
echo "--- actual ---"
echo "$actual"
exit 1
fi