Repository navigation
opnsense update #22
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: validate | |
| # Runs on every PR and push to main: lints the plugin and asserts the two | |
| # manifests agree on the version, so drift can never reach main. | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| jobs: | |
| validate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Check version consistency | |
| run: | | |
| PLUGIN=$(jq -r '.version' .claude-plugin/plugin.json) | |
| MARKET=$(jq -r '.plugins[] | select(.name == "crowdsec") | .version' \ | |
| .claude-plugin/marketplace.json) | |
| echo "plugin.json: $PLUGIN" | |
| echo "marketplace.json: $MARKET" | |
| if [ "$PLUGIN" != "$MARKET" ]; then | |
| echo "::error::Version drift — plugin.json ($PLUGIN) != marketplace.json ($MARKET)" | |
| exit 1 | |
| fi | |
| - name: Validate plugin | |
| run: | | |
| npm install -g @anthropic-ai/claude-code | |
| claude plugin validate . |