Skip to content

Commit 3a69110

Browse files
authored
Added image-name input (#14)
1 parent d97c912 commit 3a69110

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ It's 100% Open Source and licensed under the [APACHE2](LICENSE).
103103
104104
| Name | Description | Default | Required |
105105
|------|-------------|---------|----------|
106+
| image\_name | Image name (excluding registry). Defaults to {{$organization/$repository}}. | | false |
106107
| login | Docker login | | false |
107108
| organization | Organization | N/A | true |
108109
| password | Docker password | | false |

action.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ inputs:
1414
registry:
1515
description: 'Docker registry'
1616
required: true
17+
image_name:
18+
description: "Image name (excluding registry). Defaults to {{$organization/$repository}}."
19+
required: false
20+
default: ''
1721
tag:
1822
required: true
1923
description: "Tag"
@@ -38,9 +42,12 @@ runs:
3842
- uses: cloudposse/[email protected]
3943
id: context
4044
with:
41-
query: .
45+
query: .${{ inputs.image_name == '' }}
4246
config: |-
43-
image: ${{ inputs.registry }}/${{ inputs.organization }}/${{ inputs.repository }}
47+
true:
48+
image : ${{ inputs.registry }}/${{ inputs.organization }}/${{ inputs.repository }}
49+
false:
50+
image : ${{ inputs.registry }}/${{ inputs.image_name }}
4451
4552
- name: Login
4653
uses: docker/login-action@v2

docs/github-action.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
| Name | Description | Default | Required |
66
|------|-------------|---------|----------|
7+
| image\_name | Image name (excluding registry). Defaults to {{$organization/$repository}}. | | false |
78
| login | Docker login | | false |
89
| organization | Organization | N/A | true |
910
| password | Docker password | | false |

0 commit comments

Comments
 (0)