Skip to content

Commit 8e5aa89

Browse files
authored
updated based on code review
1 parent 8357d2e commit 8e5aa89

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ inputs:
3434
required: false
3535
default: ''
3636
image_name:
37-
description: 'name of docker image'
37+
description: 'Name of the image to build, e.g. "opensciencegrid/software-base"'
3838
required: false
3939
default: ''
4040

@@ -46,7 +46,7 @@ runs:
4646
- id: generate-image-name
4747
shell: bash
4848
run: |
49-
if [[ ${{ inputs.image_name }} != '' ]]; then
49+
if [[ -n ${{ inputs.image_name }} ]]; then
5050
IMAGE_NAME="${{ inputs.image_name }}"
5151
elif [[ -n "${{ inputs.name }}" ]]; then
5252
# A name was specified
@@ -62,7 +62,7 @@ runs:
6262
# grab the image name from the full context path instead
6363
IMAGE_NAME=${GITHUB_REPOSITORY%%/*}/$(basename ${{ inputs.context }})
6464
else
65-
echo "${{ inputs.context }} is not a directory"
65+
echo "No image_name provided and ${{ inputs.context }} is not a directory"
6666
exit 1
6767
fi
6868
echo "::set-output name=image::$IMAGE_NAME"

0 commit comments

Comments
 (0)