File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -13,12 +13,22 @@ inputs:
1313runs :
1414 using : " composite"
1515 steps :
16- - name : Configure to use the test image
17- if : inputs.project_name && inputs.image_url
16+ - name : Validate inputs and configure test image
1817 shell : bash
18+ env :
19+ PROJECT_NAME : ${{ inputs.project_name }}
20+ IMAGE_URL : ${{ inputs.image_url }}
1921 run : |
20- image_var=$(echo ${{ inputs.project_name }}_IMAGE | tr '[:lower:]' '[:upper:]')
21- echo "${image_var}=${{ inputs.image_url }}" >> ${{ github.action_path }}/.env
22+ if [[ -n "$PROJECT_NAME" && -n "$IMAGE_URL" ]]; then
23+ image_var=$(echo "${PROJECT_NAME}_IMAGE" | tr '[:lower:]' '[:upper:]')
24+ echo "${image_var}=$IMAGE_URL" >> ${{ github.action_path }}/.env
25+ elif [[ -z "$PROJECT_NAME" && -z "$IMAGE_URL" ]]; then
26+ echo "No project name and image URL set. Skipping image configuration."
27+ else
28+ echo "You must set both project_name and image_url or unset both."
29+ echo "project_name: $PROJECT_NAME, image_url: $IMAGE_URL"
30+ exit 1
31+ fi
2232
2333 - name : Setup dev environment
2434 shell : bash
You can’t perform that action at this time.
0 commit comments