Skip to content

Commit 72e5967

Browse files
authored
Merge pull request #5 from RyanEweSeng/Add-image-name-option
Add name option that sets a specified image name (SOFTWARE-5040)
2 parents c1d6d78 + 7b1ffc8 commit 72e5967

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, including the organization (e.g. "opensciencegrid/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=${{ 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)