Skip to content

Commit

Permalink
args to ENVIRONMENT
Browse files Browse the repository at this point in the history
  • Loading branch information
Cerosh committed Sep 10, 2024
1 parent 5daa289 commit 77c400e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/actions/set-environment-variables/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 77c400e

Please sign in to comment.