mirror of
https://github.com/anthropics/claude-plugins-official.git
synced 2026-06-13 22:26:03 -03:00
ci: validate Apache 2.0 LICENSE file exists in every plugin (#2028)
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
parent
fd06e9957e
commit
4c4b3009e0
38
.github/workflows/validate-licenses.yml
vendored
Normal file
38
.github/workflows/validate-licenses.yml
vendored
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
name: Validate Plugin Licenses
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- 'plugins/**'
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
paths:
|
||||||
|
- 'plugins/**'
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
validate-licenses:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Check every plugin has an Apache 2.0 LICENSE file
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
missing=()
|
||||||
|
for plugin_dir in plugins/*/; do
|
||||||
|
plugin="${plugin_dir%/}"
|
||||||
|
if [[ ! -f "$plugin/LICENSE" ]]; then
|
||||||
|
missing+=("$plugin")
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if [[ "${#missing[@]}" -gt 0 ]]; then
|
||||||
|
echo "::error::The following plugins are missing a LICENSE file:"
|
||||||
|
for p in "${missing[@]}"; do
|
||||||
|
echo " - $p"
|
||||||
|
done
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "All $(ls -d plugins/*/ | wc -l) plugins have a LICENSE file."
|
||||||
Loading…
x
Reference in New Issue
Block a user