Skip to content

Commit 66b023b

Browse files
committed
Add name option that uses the provided name if any was provided
1 parent c1d6d78 commit 66b023b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

action.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ inputs:
2222
description: 'Path to container files, including Dockerfile'
2323
required: false
2424
default: '.'
25+
name:
26+
description: 'Name of image'
27+
required: false
28+
default: ''
2529

2630
runs:
2731
using: "composite"
@@ -31,7 +35,10 @@ runs:
3135
- id: generate-image-name
3236
shell: bash
3337
run: |
34-
if [[ ${{ inputs.context }} == "." ]] || \
38+
if [[ -n ${{ inputs.name }} ]]; then
39+
# A name was specified
40+
IMAGE_NAME=$GITHUB_REPOSITORY_OWNER/${{ inputs.name }}
41+
elif [[ ${{ inputs.context }} == "." ]] || \
3542
[[ ${{ inputs.context }} == "./" ]]; then
3643
# Try to guess the image name from our docker repo naming conventions
3744
# E.g., opensciencegrid/docker-frontier-squid

0 commit comments

Comments
 (0)