From 0a5360d3645dcfc96d34aea7411ac42e0103ade0 Mon Sep 17 00:00:00 2001 From: Piotr Siuszko Date: Wed, 27 Dec 2023 20:53:03 +0100 Subject: [PATCH] Add version input to workflow dispatch --- .github/workflows/deploy.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d215842..0c1e210 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -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: