Skip to content

Commit ef38de3

Browse files
committed
fix: support logging option
1 parent a80bd0d commit ef38de3

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ The action downloads the latest version of the CLI binary by default, but you ca
2020
| `template` | Built-in template for output (`md`, `md-plain`, `html`, `txt`). | No | - |
2121
| `template-file` | Path to a custom Handlebars template file in the repository. | No | - |
2222
| `template-string` | Custom Handlebars template content as a string. | No | - |
23+
| `log-level` | Specifies the logging level for the CLI | No | `info` |
2324
| `token` | Optional GitHub token with content write permission. | No | `${{ github.token }}` |
2425
| `version` | Version of the `mcp-discovery` CLI to use (e.g., `v0.1.2`). Use `latest` for the latest release. | No | `latest` |
2526

action.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ inputs:
2626
template-string:
2727
description: "Custom Handlebars template content as a string"
2828
required: false
29+
log-level:
30+
description: "Specifies the logging level for the CLI (default: info)"
31+
default: "info"
32+
required: false
2933
version:
3034
description: "CLI version (e.g., latest or v0.1.2)"
3135
required: true
@@ -57,13 +61,15 @@ runs:
5761
TEMPLATE: ${{ inputs.template }}
5862
TEMPLATE_FILE: ${{ inputs.template-file }}
5963
TEMPLATE_STRING: ${{ inputs.template-string }}
64+
LOG_LEVEL: ${{ inputs.log-level }}
6065
run: |
6166
# Build CLI arguments
6267
ARGS=""
6368
[ -n "$FILENAME" ] && ARGS="$ARGS --filename \"$FILENAME\""
6469
[ -n "$TEMPLATE" ] && ARGS="$ARGS --template \"$TEMPLATE\""
6570
[ -n "$TEMPLATE_FILE" ] && ARGS="$ARGS --template-file \"$GITHUB_WORKSPACE/$TEMPLATE_FILE\""
6671
[ -n "$TEMPLATE_STRING" ] && ARGS="$ARGS --template-string \"$TEMPLATE_STRING\""
72+
[ -n "$LOG_LEVEL" ] && ARGS="$ARGS --log-level \"$LOG_LEVEL\""
6773
# Run CLI
6874
echo "Running: mcp-discovery $CLI_COMMAND $ARGS -- $MCP_LAUNCH_COMMAND"
6975
eval "mcp-discovery $CLI_COMMAND $ARGS -- $MCP_LAUNCH_COMMAND"

0 commit comments

Comments
 (0)