Review app licences and test only the recipes a change touches (#3)
docs/licensing.md checks every app in PikaPods' catalog against its licence: 70 allowed, 53 allowed with conditions, 8 not allowed (n8n, NocoDB, Journiv, SparkyFitness, Bugsink, Directus, Joplin Server, Stirling PDF). The Compose test now runs only on recipes a push or pull request changes, pruning images between recipes, so CI keeps working as the catalog grows. A manual run still tests every recipe.
This commit is contained in:
1 parent
8a1d5c750f
commit
42a9780b1d
3 files changed
+189
-8
No files matched your search
@@ -1,17 +1,33 @@
|
||||
name: Check recipes
|
||||
on: [push, pull_request]
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
workflow_dispatch: # tests every recipe
|
||||
permissions: { contents: read }
|
||||
jobs:
|
||||
# The same test contributors run locally: every recipe with Docker Compose, until its
|
||||
# health path answers 200. Runs on every pull request, forks included.
|
||||
# The same test contributors run locally: each recipe with Docker Compose, until its health
|
||||
# path answers 200. Pull requests and pushes test the recipes they change; a manual run tests
|
||||
# all of them. Runs on every pull request, forks included.
|
||||
compose:
|
||||
name: Docker Compose test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Test every recipe
|
||||
with: { fetch-depth: 0 }
|
||||
- name: Test changed recipes
|
||||
env:
|
||||
BASE: ${{ github.event.pull_request.base.sha || github.event.before }}
|
||||
run: |
|
||||
for app in apps/*/; do scripts/local-test.sh "$app"; done
|
||||
if [ "$GITHUB_EVENT_NAME" = workflow_dispatch ] || [ -z "$BASE" ] || ! git cat-file -e "$BASE^{commit}" 2>/dev/null; then
|
||||
apps=$(ls -d apps/*/)
|
||||
else
|
||||
apps=$(git diff --name-only "$BASE" HEAD -- apps/ | cut -d/ -f1-2 | sort -u)
|
||||
fi
|
||||
for app in $apps; do
|
||||
[ -d "$app" ] || continue # removed by this change
|
||||
scripts/local-test.sh "$app"
|
||||
docker system prune -af --volumes >/dev/null # keep the runner's disk free
|
||||
done
|
||||
|
||||
# Cottage's own checks: the recipe is accepted by the platform and runs its full lifecycle.
|
||||
# The platform isn't public, so this needs the PLATFORM_KEY secret (a read-only deploy key)
|
||||
|
||||
Reference in new issue
Block a user