Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: EK-527 support for multiple content directories #57

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ Improve the quality and consistency of your documentation with EkLine, an automa
```yaml
inputs:
content_dir:
description: 'Content directory relative to the root directory.'
description: 'Content directories relative to the root. Specify a single path or multiple paths (one per line). Example:
content_dir: ./testData
content_dir: |
./testData
./testData2'
default: '.'
ek_token:
description: 'Token for EkLine application'
Expand Down
6 changes: 5 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ inputs:
description: 'Token for EkLine application'
required: true
content_dir:
description: 'Content directory relative to the root directory.'
description: 'Content directories relative to the root. Specify a single path or multiple paths (one per line). Example:
content_dir: ./testData
content_dir: |
./testData
./testData2'
default: '.'
ignore_rule:
description: 'Ignore the rules that are passed in as comma seperated values (eg: EK1,EK4)'
Expand Down
14 changes: 13 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,19 @@ if [ -n "${changed_files}" ]; then
fi


ekline -cd "${INPUT_CONTENT_DIR}" -et "${INPUT_EK_TOKEN}" ${cf_option} -o "${output}" -i "${INPUT_IGNORE_RULE}" "${disable_suggestions}" "${ai_suggestions}"
ekline_args=""
while IFS= read -r dir; do
if [ -n "$dir" ]; then
ekline_args="$ekline_args -cd \"$dir\""
fi
done <<EOF
$INPUT_CONTENT_DIR
EOF

ekline_command="ekline $ekline_args -et \"${INPUT_EK_TOKEN}\" ${cf_option} -o \"${output}\" -i \"${INPUT_IGNORE_RULE}\" ${disable_suggestions} ${ai_suggestions}"

eval "$ekline_command"


if [ -s "$output" ]; then
if [ "$GITHUB_ACTIONS" = "true" ]; then
Expand Down
Loading