From 4925926dd7669cab5e59b87d9d97dcfe8a3af12d Mon Sep 17 00:00:00 2001 From: Alan Larkin Date: Sat, 3 Aug 2024 21:48:05 +0100 Subject: [PATCH] ci: Parameterise Github `workflow_dispatch` Update the Github `deploy` workflow to parameterise the reference to deploy (branch, revision, etc.). --- .github/workflows/deploy.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c6fc4ad..55ff067 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -4,7 +4,13 @@ on: push: branches: - main - workflow_dispatch: {} + workflow_dispatch: + inputs: + ref: + default: main + description: 'Branch, tag or commit SHA1 to build' + required: true + type: string jobs: build-and-deploy: @@ -16,6 +22,8 @@ jobs: steps: - name: Checkout the repository uses: actions/checkout@v4 + with: + ref: ${{ inputs.ref }} - name: Setup pnpm uses: pnpm/action-setup@v4.0.0