mirror of
https://github.com/nextcloud/documentation.git
synced 2026-01-02 17:59:36 +07: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>
29 lines
853 B
YAML
29 lines
853 B
YAML
name: Check occ command syntax
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- '**.rst'
|
|
|
|
jobs:
|
|
check-occ-command:
|
|
name: Check occ command syntax
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
|
|
- name: Run script
|
|
run: |
|
|
RST_FILE="$(find ./ -name '*.rst')"
|
|
mapfile -t RST_FILE <<< "$RST_FILE"
|
|
for file in "${RST_FILE[@]}"; do
|
|
if [ "$(grep "php occ" "$file" | grep -v "sudo -E -u www-data php occ" | wc -l)" -gt 0 ]; then
|
|
printf "%b%s%b\n" "\e[0;31m" "$file does not use the 'sudo -E -u www-data php occ' syntax in some places which is required." "\e[0m"
|
|
echo "See $(grep "php occ" "$file" | grep -v "sudo -E -u www-data php occ")"
|
|
FAIL=1
|
|
fi
|
|
done
|
|
if [ -n "$FAIL" ]; then
|
|
exit 1
|
|
fi
|