diff --git a/.github/actions/set-environment-variables/action.yml b/.github/actions/set-environment-variables/action.yml index b143ba1..8fac47f 100644 --- a/.github/actions/set-environment-variables/action.yml +++ b/.github/actions/set-environment-variables/action.yml @@ -14,14 +14,13 @@ runs: env: API_CHALLENGES_LIVE: ${{ github.secrets.API_CHALLENGES_LIVE }} API_CHALLENGES_TEST: ${{ github.secrets.API_CHALLENGES_TEST }} - args: - - ${{ inputs.environment }} + ENVIRONMENT: ${{ inputs.environment }} run: | - if [ "${0}" == "live" ]; then + if [ "${ENVIRONMENT}" == "live" ]; then echo "API_BASE_URL=${API_CHALLENGES_LIVE}" >> $GITHUB_ENV - elif [ "${0}" == "test" ]; then + elif [ "${ENVIRONMENT}" == "test" ]; then echo "API_BASE_URL=${API_CHALLENGES_TEST}" >> $GITHUB_ENV else - echo "Error: Unknown environment '${0}'. Please use 'live' or 'test'." >&2 + echo "Error: Unknown environment '${ENVIRONMENT}'. Please use 'live' or 'test'." >&2 exit 1 fi