From b95e24ffc13c83ef365dbd9ada3be416172766ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edd=C3=BA=20Mel=C3=A9ndez?= Date: Tue, 18 Jul 2023 13:58:53 -0600 Subject: [PATCH] Convert inputs to env vars --- action.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/action.yml b/action.yml index c853f05..43fb740 100644 --- a/action.yml +++ b/action.yml @@ -39,22 +39,25 @@ runs: # prepare tcc env vars projectKey="$GITHUB_REPOSITORY" - if [ -v ${{ inputs.project-key }} ]; then - projectKey="$${{ inputs.project-key }}" - elif [ -v TCC_PROJECT_KEY ]; then + if [[ ! -z "$INPUT_PROJECT_KEY" ]]; then + projectKey="$INPUT_PROJECT_KEY" + elif [[ ! -z "$TCC_PROJECT_KEY" ]]; then projectKey="$TCC_PROJECT_KEY" fi projectUrl="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" - if [ -v ${{ inputs.project-url }} ]; then - projectUrl="${{ inputs.project-url }}" - elif [ -v TCC_PROJECT_URL ]; then + if [[ ! -z "$INPUT_PROJECT_URL" ]]; then + projectUrl="$INPUT_PROJECT_URL" + elif [[ ! -z "$TCC_PROJECT_URL" ]]; then projectUrl="$TCC_PROJECT_URL" fi echo "TCC_PROJECT_KEY=${projectKey}" >> $GITHUB_ENV echo "TCC_PROJECT_URL=${projectUrl}" >> $GITHUB_ENV + env: + INPUT_PROJECT_KEY: ${{ inputs.project-key }} + INPUT_PROJECT_URL: ${{ inputs.project-url }} - id: testcontainers-cloud name: Download and run Testcontainers Cloud Client shell: bash