Skip to content

Commit 05a3c2b

Browse files
authored
support defining custom tag (#89)
1 parent 3ef5af0 commit 05a3c2b

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ jobs:
111111
| `docker-registry` | Docker Registry | `staffbase.jfrog.io` |
112112
| `docker-registry-api` | Docker Registry API (used for retagging without pulling) | `https://staffbase.jfrog.io/artifactory/api/docker/` |
113113
| `docker-image` | Docker Image | |
114+
| `docker-custom-tag` | Docker Custom Tag to be set on the image | |
114115
| `docker-username` | Username for the Docker Registry | |
115116
| `docker-password` | Password for the Docker Registry | |
116117
| `docker-file` | Dockerfile | `./Dockerfile` |

action.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ inputs:
1414
docker-image:
1515
description: 'Docker Image'
1616
required: true
17+
docker-custom-tag:
18+
description: 'Docker Custom Tag'
19+
required: false
1720
docker-username:
1821
description: 'Username for the Docker Registry'
1922
required: false
@@ -90,7 +93,12 @@ runs:
9093
shell: bash
9194
run: |
9295
BUILD="true"
93-
if [[ $GITHUB_REF == refs/heads/master ]]; then
96+
if [[ -n "${{ inputs.docker-custom-tag }}" ]]; then
97+
TAG="${{ inputs.docker-custom-tag }}"
98+
LATEST="latest"
99+
PUSH="true"
100+
BUILD="${{ inputs.docker-disable-retagging }}"
101+
elif [[ $GITHUB_REF == refs/heads/master ]]; then
94102
TAG="master-${GITHUB_SHA::8}"
95103
LATEST="master"
96104
PUSH="true"

0 commit comments

Comments
 (0)