Add version input to workflow dispatch
This commit is contained in:
parent
588a5843f2
commit
0a5360d364
|
|
@ -2,6 +2,11 @@ name: Deploy
|
|||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: Pass the version
|
||||
required: true
|
||||
type: string
|
||||
push:
|
||||
tags:
|
||||
- "[0-9]+.[0-9]+.[0-9]+"
|
||||
|
|
@ -31,8 +36,12 @@ jobs:
|
|||
|
||||
- name: Get the release version from the tag
|
||||
shell: bash
|
||||
if: ${{ github.event_name == 'push' }}
|
||||
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
|
||||
|
||||
- name: Get the release version from the input
|
||||
shell: bash
|
||||
if: ${{ github.event_name == 'workflow_dispatch' }}
|
||||
run: echo "VERSION="${{ inputs.version }}"" >> $GITHUB_ENV
|
||||
- name: Install Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
|
|
|
|||
Loading…
Reference in New Issue