Skip to content
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ The action downloads the latest version of the CLI binary by default, but you ca
| `template` | Built-in template for output (`md`, `md-plain`, `html`, `txt`). | No | - |
| `template-file` | Path to a custom Handlebars template file in the repository. | No | - |
| `template-string` | Custom Handlebars template content as a string. | No | - |
| `log-level` | Specifies the logging level for the CLI | No | `info` |
| `token` | Optional GitHub token with content write permission. | No | `${{ github.token }}` |
| `version` | Version of the `mcp-discovery` CLI to use (e.g., `v0.1.2`). Use `latest` for the latest release. | No | `latest` |

Expand Down
6 changes: 6 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ inputs:
template-string:
description: "Custom Handlebars template content as a string"
required: false
log-level:
description: "Specifies the logging level for the CLI (default: info)"
default: "info"
required: false
version:
description: "CLI version (e.g., latest or v0.1.2)"
required: true
Expand Down Expand Up @@ -57,13 +61,15 @@ runs:
TEMPLATE: ${{ inputs.template }}
TEMPLATE_FILE: ${{ inputs.template-file }}
TEMPLATE_STRING: ${{ inputs.template-string }}
LOG_LEVEL: ${{ inputs.log-level }}
run: |
# Build CLI arguments
ARGS=""
[ -n "$FILENAME" ] && ARGS="$ARGS --filename \"$FILENAME\""
[ -n "$TEMPLATE" ] && ARGS="$ARGS --template \"$TEMPLATE\""
[ -n "$TEMPLATE_FILE" ] && ARGS="$ARGS --template-file \"$GITHUB_WORKSPACE/$TEMPLATE_FILE\""
[ -n "$TEMPLATE_STRING" ] && ARGS="$ARGS --template-string \"$TEMPLATE_STRING\""
[ -n "$LOG_LEVEL" ] && ARGS="$ARGS --log-level \"$LOG_LEVEL\""
# Run CLI
echo "Running: mcp-discovery $CLI_COMMAND $ARGS -- $MCP_LAUNCH_COMMAND"
eval "mcp-discovery $CLI_COMMAND $ARGS -- $MCP_LAUNCH_COMMAND"
Expand Down