File tree 1 file changed +14
-4
lines changed
1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -13,12 +13,22 @@ inputs:
13
13
runs :
14
14
using : " composite"
15
15
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
18
17
shell : bash
18
+ env :
19
+ PROJECT_NAME : ${{ inputs.project_name }}
20
+ IMAGE_URL : ${{ inputs.image_url }}
19
21
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
22
32
23
33
- name : Setup dev environment
24
34
shell : bash
You can’t perform that action at this time.
0 commit comments