Stamp metadata.anthropic_cookbook on managed-agent deploys #18
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: plugin-validate | |
| # Runs the official Claude Code plugin linter over every plugin and the | |
| # marketplace manifest. Catches malformed manifests (e.g. hooks.json as a | |
| # bare [] instead of {"hooks": {}}) before they reach users. | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| env: | |
| # Pinned for reproducible builds + a stable cache key. Bump by setting this | |
| # to a newer version from https://downloads.claude.ai/claude-code-releases/stable | |
| CLAUDE_VERSION: 2.1.133 | |
| jobs: | |
| validate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Cache Claude Code CLI | |
| id: cli-cache | |
| uses: actions/cache@v4 | |
| with: | |
| # ~/.local/bin/claude is a symlink into the versioned dir below — | |
| # both must be cached or the restored symlink dangles (exit 127). | |
| path: | | |
| ~/.local/bin/claude | |
| ~/.local/share/claude | |
| key: claude-cli-${{ runner.os }}-${{ env.CLAUDE_VERSION }}-v2 | |
| - name: Install Claude Code CLI | |
| if: steps.cli-cache.outputs.cache-hit != 'true' | |
| run: curl -fsSL https://claude.ai/install.sh | bash -s "$CLAUDE_VERSION" | |
| - name: Validate marketplace + every plugin | |
| run: | | |
| set -euo pipefail | |
| export PATH="$HOME/.local/bin:$PATH" | |
| claude --version | |
| fail=0 | |
| echo "::group::marketplace" | |
| claude plugin validate .claude-plugin/marketplace.json || fail=1 | |
| echo "::endgroup::" | |
| while IFS= read -r manifest; do | |
| plugin_dir="$(dirname "$(dirname "$manifest")")" | |
| echo "::group::$plugin_dir" | |
| claude plugin validate "$plugin_dir" || fail=1 | |
| echo "::endgroup::" | |
| done < <(find plugins -path '*/.claude-plugin/plugin.json' | sort) | |
| if [ "$fail" -ne 0 ]; then | |
| echo "::error::plugin validation failed — see grouped logs above" | |
| exit 1 | |
| fi |