Skip to content

Commit

Permalink
feat: add instruments input
Browse files Browse the repository at this point in the history
  • Loading branch information
adriencaccia committed Jan 17, 2024
1 parent dc62945 commit 7b9d274
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,14 @@ inputs:
default: "2.0.3"
required: true

mongo-db:
description: "Whether to enable MongoDB instrumentation. Requires the MongoDB integration to be enabled on the organization."
instruments:
description: |
Comma separated list of instruments to enable. The following instruments are available:
- `mongodb`: MongoDB instrumentation, requires the MongoDB instrument to be enabled for the organization in CodSpeed
required: false
mongo-uri-env-name:
description: |
The name of the environment variable containing the MongoDB URI. Requires the `mongodb` input to be set to `true`.
The name of the environment variable containing the MongoDB URI. Requires the `mongodb` instrument to be activated in `instruments`.
If the instrumentation is enabled and this value is not set, the user will need to dynamically provide the MongoDB URI to the CodSpeed runner.
required: false

Expand All @@ -54,8 +56,8 @@ runs:
if [ -n "${{ inputs.upload-url }}" ]; then
RUNNER_ARGS="$RUNNER_ARGS --upload-url=${{ inputs.upload-url }}"
fi
if [ "${{ inputs.mongo-db }}" = "true" ]; then
RUNNER_ARGS="$RUNNER_ARGS --mongo-db"
if [ -n "${{ inputs.instruments }}" ]; then
RUNNER_ARGS="$RUNNER_ARGS --instruments '${{ inputs.instruments }}'"
fi
if [ -n "${{ inputs.mongo-uri-env-name }}" ]; then
RUNNER_ARGS="$RUNNER_ARGS --mongo-uri-env-name=${{ inputs.mongo-uri-env-name }}"
Expand Down

0 comments on commit 7b9d274

Please sign in to comment.