manual trigger (#2681)

This commit is contained in:
Lukas Gravley 2022-03-25 10:20:52 -05:00 committed by GitHub
parent 9bf6767260
commit 60e7787217
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,7 +16,14 @@ name: Deploy Release
on: on:
# Start when a release is published # Start when a release is published
release: release:
types: [published, edited] types: [published]
workflow_dispatch:
# Set the input variables you want to pull in
inputs:
release_version:
description: 'version to release. Ex: v4.3.2'
required: true
default: 'v'
############### ###############
# Set the Job # # Set the Job #
@ -50,10 +57,6 @@ jobs:
############################ ############################
- name: Checkout Code - name: Checkout Code
uses: actions/checkout@v3 uses: actions/checkout@v3
with:
# Full git history is needed to get a proper list
# of changed files within `super-linter`
fetch-depth: 0
########################### ###########################
# Set current date to ENV # # Set current date to ENV #
@ -97,6 +100,11 @@ jobs:
echo "RELEASE_VERSION=$(echo ${{ github.event.release.name }} \ echo "RELEASE_VERSION=$(echo ${{ github.event.release.name }} \
| grep -E -o "v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+")" \ | grep -E -o "v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+")" \
>> "${GITHUB_ENV}" >> "${GITHUB_ENV}"
if [ -z "${RELEASE_VERSION}" ]; then
echo "No release version found in environment, using input..."
echo "RELEASE_VERSION=${{ github.event.inputs.release_version }}" \
>> "${GITHUB_ENV}"
fi
######################### #########################
# Update deployment API # # Update deployment API #