From 7b9d2744f2ae8ae7751b73f09a2f8aee5a9dc725 Mon Sep 17 00:00:00 2001 From: Adrien Cacciaguerra Date: Tue, 16 Jan 2024 10:32:43 +0100 Subject: [PATCH] feat: add instruments input --- action.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/action.yml b/action.yml index 5de21ae..f391a71 100644 --- a/action.yml +++ b/action.yml @@ -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 @@ -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 }}"