mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-01-27 07:58:44 +08:00
add community-container validator
Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
parent
f221ab7655
commit
ca3466759f
1 changed files with 37 additions and 0 deletions
37
.github/workflows/community-containers.yml
vendored
Normal file
37
.github/workflows/community-containers.yml
vendored
Normal file
|
@ -0,0 +1,37 @@
|
|||
name: Validate community containers
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- 'community-containers/**'
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'community-containers/**'
|
||||
|
||||
jobs:
|
||||
validator-community-containers:
|
||||
name: Validate community containers
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: Validate structure
|
||||
run: |
|
||||
CONTAINERS="$(find ./community-containers -mindepth 1 -maxdepth 1 -type d)"
|
||||
mapfile -t CONTAINERS <<< "$CONTAINERS"
|
||||
for container in "${CONTAINERS[@]}"; do
|
||||
container="$(echo "$container" | sed 's|./community-containers/||')"
|
||||
if ! [ -f ./community-containers/"$container"/"$container.json" ]; then
|
||||
echo ".json file must be named like its parent folder $container"
|
||||
FAIL=1
|
||||
fi
|
||||
if ! [ -f ./community-containers/"$container"/readme.md ]; then
|
||||
echo "There must be a readme.md file in the folder!"
|
||||
FAIL=1
|
||||
fi
|
||||
if [ -n "$FAIL" ]; then
|
||||
exit 1
|
||||
fi
|
||||
done
|
Loading…
Reference in a new issue