Skip to content

Commit

Permalink
support defining custom tag
Browse files Browse the repository at this point in the history
  • Loading branch information
askvinni committed Jun 28, 2024
1 parent 3ef5af0 commit a800a32
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ inputs:
docker-image:
description: 'Docker Image'
required: true
docker-custom-tag:
description: 'Docker Custom Tag'
required: false
docker-username:
description: 'Username for the Docker Registry'
required: false
Expand Down Expand Up @@ -90,7 +93,12 @@ runs:
shell: bash
run: |
BUILD="true"
if [[ $GITHUB_REF == refs/heads/master ]]; then
if [[ -n "${{ inputs.docker-custom-tag }}" ]]; then
TAG="${{ inputs.docker-custom-tag }}"
LATEST="latest"
PUSH="true"
BUILD="${{ inputs.docker-disable-retagging }}"
elif [[ $GITHUB_REF == refs/heads/master ]]; then
TAG="master-${GITHUB_SHA::8}"
LATEST="master"
PUSH="true"
Expand Down

0 comments on commit a800a32

Please sign in to comment.