mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 06:26:57 +00:00
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5. - [Release notes](https://github.com/actions/checkout/releases) - [Commits](https://github.com/actions/checkout/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
37 lines
1.1 KiB
YAML
37 lines
1.1 KiB
YAML
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@v5
|
|
- 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
|