summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorNoah Zweben <noahz@anthropic.com>2026-05-27 09:25:23 -0700
committerGitHub <noreply@github.com>2026-05-27 17:25:23 +0100
commit4c4b3009e067493def95aabd0ce34a59d45eb18d (patch)
treea65922af6ed729e20b3f5215481dc08cd9f55555 /.github/workflows
parentfd06e9957e6b178fd1e0979c2ac37f68fa7bfd47 (diff)
ci: validate Apache 2.0 LICENSE file exists in every plugin (#2028)
Co-authored-by: Claude <noreply@anthropic.com>
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/validate-licenses.yml38
1 files changed, 38 insertions, 0 deletions
diff --git a/.github/workflows/validate-licenses.yml b/.github/workflows/validate-licenses.yml
new file mode 100644
index 00000000..f882df6e
--- /dev/null
+++ b/.github/workflows/validate-licenses.yml
@@ -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."