mirror of
https://github.com/rclone/rclone.git
synced 2025-11-23 21:44:49 +02:00
18 lines
464 B
Bash
Executable File
18 lines
464 B
Bash
Executable File
#!/usr/bin/env bash
|
|
#
|
|
# Run markdown linting locally
|
|
set -e
|
|
|
|
# Workflow
|
|
build=.github/workflows/build.yml
|
|
|
|
# Globs read from from $build
|
|
globs=$(awk '/- name: Check Markdown format/{f=1;next} f && /globs:/{f=2;next} f==2 && NF{if($1=="-"){exit} print $0}' $build)
|
|
|
|
if [ -z "$globs" ]; then
|
|
echo "Error: No globs found in Check Markdown step in $build" >&2
|
|
exit 1
|
|
fi
|
|
|
|
docker run -v $PWD:/workdir --user $(id -u):$(id -g) davidanson/markdownlint-cli2 $globs
|