From a800a324f883eb12776ed6ddc1542ae67f5439ca Mon Sep 17 00:00:00 2001 From: Vinicius Dalpiccol Date: Fri, 28 Jun 2024 16:18:12 +0200 Subject: [PATCH] support defining custom tag --- action.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index de74c73..1f1e5ae 100644 --- a/action.yml +++ b/action.yml @@ -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 @@ -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"