Skip to content

Commit

Permalink
fix logic error
Browse files Browse the repository at this point in the history
  • Loading branch information
BYK committed Jan 24, 2025
1 parent 03cb75d commit 5053c62
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ runs:
PROJECT_NAME: ${{ inputs.project_name }}
IMAGE_URL: ${{ inputs.image_url }}
run: |
if [[ -n $PROJECT_NAME && -n $IMAGE_URL ]]; then
if [[ -n "$PROJECT_NAME" && -n "$IMAGE_URL" ]]; then
image_var=$(echo "${PROJECT_NAME}_IMAGE" | tr '[:lower:]' '[:upper:]')
echo "${image_var}=$IMAGE_URL" >> ${{ github.action_path }}/.env
elif [[ -z $PROJECT_NAME || -z $IMAGE_URL ]]; then
elif [[ -z $PROJECT_NAME && -z $IMAGE_URL ]]; then
echo "No project name and image URL set. Skipping image configuration."
else
echo "You must set both project_name and image_url or unset both."
echo "project_name: $PROJECT_NAME, image_url: $IMAGE_URL"
exit 1
Expand Down

0 comments on commit 5053c62

Please sign in to comment.