Skip to content

Commit

Permalink
Convert inputs to env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
Eddú Meléndez committed Jul 18, 2023
1 parent 2172ae0 commit b95e24f
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b95e24f

Please sign in to comment.