diff --git a/action.yaml b/action.yaml index 8956b74..dd92de4 100644 --- a/action.yaml +++ b/action.yaml @@ -43,7 +43,7 @@ runs: if [ "$STRICT" = "true" ]; then opts=--strict elif [ "$STRICT" != "false" ]; then - echo '::error:: the input 'strict' must be "true" or "false"' + echo "::error:: the input 'strict' must be \"true\" or \"false\"" exit 1 fi @@ -56,22 +56,24 @@ runs: if [ -z "$file" ]; then continue fi - echo "===> RENOVATE_CONFIG_FILE=\"$file\" npx --yes --package \"$pkg\" -c \"renovate-config-validator $opts\"" >&2 - RENOVATE_CONFIG_FILE="$file" npx --yes --package "$pkg" -c "renovate-config-validator $opts" + echo "===> npx --yes --package \"$pkg\" -c \"renovate-config-validator $opts $file\"" >&2 + npx --yes --package "$pkg" -c "renovate-config-validator $opts $file" done < <(echo "$CONFIG_FILE_PATH") exit 0 - fi + else - missing=true - for file in .github/renovate.json .github/renovate.json5 .gitlab/renovate.json .gitlab/renovate.json5 .renovaterc.json .renovaterc.json5 renovate.json renovate.json5 .renovaterc; do - if [ -f "$file" ]; then - missing=false - echo "===> RENOVATE_CONFIG_FILE=\"$file\" npx --yes --package \"$pkg\" -c \"renovate-config-validator $opts\"" >&2 - RENOVATE_CONFIG_FILE="$file" npx --yes --package "$pkg" -c "renovate-config-validator $opts" + missing=true + for file in .github/renovate.json .github/renovate.json5 .gitlab/renovate.json .gitlab/renovate.json5 .renovaterc.json .renovaterc.json5 renovate.json renovate.json5 .renovaterc; do + if [ -f "$file" ]; then + missing=false + echo "===> npx --yes --package \"$pkg\" -c \"renovate-config-validator $opts $file\"" >&2 + echo "===> RENOVATE_CONFIG_FILE=\"$file\" npx --yes --package \"$pkg\" -c \"renovate-config-validator $opts\"" >&2 + npx --yes --package "$pkg" -c "renovate-config-validator $opts $file" + fi + done + if [ "$missing" = "true" ]; then + echo "===> No configuration file is found" >&2 fi - done - if [ "$missing" = "true" ]; then - echo "===> No configuration file is found" >&2 fi shell: bash env: