Skip to content

Commit

Permalink
Allow input of tag name in deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
MitchTalmadge authored Nov 11, 2023
1 parent 92f2a86 commit e96189e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ on:
tags:
- v*
workflow_dispatch:

inputs:
tag:
required: true
description: e.g. v22

jobs:
build:
Expand All @@ -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: |
Expand Down

0 comments on commit e96189e

Please sign in to comment.