Skip to content

Commit

Permalink
access the environment input using github.event.inputs.environment
Browse files Browse the repository at this point in the history
  • Loading branch information
Cerosh committed Sep 10, 2024
1 parent 53942dd commit 11d9287
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/actions/set-environment-variables/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ runs:
API_CHALLENGES_LIVE: ${{ github.secrets.API_CHALLENGES_LIVE }}
API_CHALLENGES_TEST: ${{ github.secrets.API_CHALLENGES_TEST }}
run: |
if [ "${{inputs.environment}}" == "live" ]; then
if [ "${{ github.event.inputs.environment }}" == "live" ]; then
echo "API_BASE_URL=${API_CHALLENGES_LIVE}" >> $GITHUB_ENV
elif [ "${{inputs.environment}}" == "test" ]; then
elif [ "${{ github.event.inputs.environment }}" == "test" ]; then
echo "API_BASE_URL=${API_CHALLENGES_TEST}" >> $GITHUB_ENV
else
echo "Error: Unknown environment '${{inputs.environment}}'. Please use 'live' or 'test'." >&2
echo "Error: Unknown environment '${{ github.eventinputs.environment }}'. Please use 'live' or 'test'." >&2
exit 1
fi

0 comments on commit 11d9287

Please sign in to comment.