From e96189e25b7ab1b5f67481b00f6a432337d3af2e Mon Sep 17 00:00:00 2001 From: Mitch Talmadge <8848080+MitchTalmadge@users.noreply.github.com> Date: Fri, 10 Nov 2023 21:39:04 -0700 Subject: [PATCH] Allow input of tag name in deploy --- .github/workflows/deploy-prod.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-prod.yml b/.github/workflows/deploy-prod.yml index 1b4f076..e27cbc3 100644 --- a/.github/workflows/deploy-prod.yml +++ b/.github/workflows/deploy-prod.yml @@ -7,7 +7,10 @@ on: tags: - v* workflow_dispatch: - + inputs: + tag: + required: true + description: e.g. v22 jobs: build: @@ -26,7 +29,12 @@ jobs: path: /tmp - name: "Get Tag Name" id: get_tag_name - run: echo "TAG_NAME=$(echo ${GITHUB_REF#refs/tags/})" >> $GITHUB_OUTPUT + run: | + if [[ "${{ github.event_name }}" == "workflow_dispatch" && "${{ github.event.inputs.tag }}" != "" ]]; then + echo "TAG_NAME=${{ github.event.inputs.tag }}" >> $GITHUB_ENV + else + echo "TAG_NAME=$(echo ${GITHUB_REF#refs/tags/})" >> $GITHUB_ENV + fi - name: "Load Docker Images" id: load_images run: |