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 2d6b0a5
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,23 +38,31 @@ runs:
run: |
# prepare tcc env vars
projectKey="$GITHUB_REPOSITORY"
if [ -v ${{ inputs.project-key }} ]; then
projectKey="$${{ inputs.project-key }}"
elif [ -v TCC_PROJECT_KEY ]; then
echo $projectKey
echo $INPUT_PROJECT_KEY
echo "$INPUT_PROJECT_KEY"
if [ -z "$INPUT_PROJECT_KEY" ]; then
projectKey="$INPUT_PROJECT_KEY"
echo $projectKey
elif [ -z "$TCC_PROJECT_KEY" ]; then
projectKey="$TCC_PROJECT_KEY"
echo $projectKey
fi
echo $projectKey
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 2d6b0a5

Please sign in to comment.