Skip to content

Commit

Permalink
Added image-name input (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
goruha authored Jul 3, 2023
1 parent d97c912 commit 3a69110
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ It's 100% Open Source and licensed under the [APACHE2](LICENSE).
| Name | Description | Default | Required |
|------|-------------|---------|----------|
| image\_name | Image name (excluding registry). Defaults to {{$organization/$repository}}. | | false |
| login | Docker login | | false |
| organization | Organization | N/A | true |
| password | Docker password | | false |
Expand Down
11 changes: 9 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ inputs:
registry:
description: 'Docker registry'
required: true
image_name:
description: "Image name (excluding registry). Defaults to {{$organization/$repository}}."
required: false
default: ''
tag:
required: true
description: "Tag"
Expand All @@ -38,9 +42,12 @@ runs:
- uses: cloudposse/[email protected]
id: context
with:
query: .
query: .${{ inputs.image_name == '' }}
config: |-
image: ${{ inputs.registry }}/${{ inputs.organization }}/${{ inputs.repository }}
true:
image : ${{ inputs.registry }}/${{ inputs.organization }}/${{ inputs.repository }}
false:
image : ${{ inputs.registry }}/${{ inputs.image_name }}
- name: Login
uses: docker/login-action@v2
Expand Down
1 change: 1 addition & 0 deletions docs/github-action.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

| Name | Description | Default | Required |
|------|-------------|---------|----------|
| image\_name | Image name (excluding registry). Defaults to {{$organization/$repository}}. | | false |
| login | Docker login | | false |
| organization | Organization | N/A | true |
| password | Docker password | | false |
Expand Down

0 comments on commit 3a69110

Please sign in to comment.