From dc25e78ef0b829cdf837bc00e173792496e7b6bd Mon Sep 17 00:00:00 2001 From: Armon Raphiel Date: Wed, 24 Jan 2024 02:17:53 -0600 Subject: [PATCH] feat: add manual deploy trigger --- .github/workflows/deploy-manual.yml | 35 +++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/deploy-manual.yml diff --git a/.github/workflows/deploy-manual.yml b/.github/workflows/deploy-manual.yml new file mode 100644 index 0000000..3e3e441 --- /dev/null +++ b/.github/workflows/deploy-manual.yml @@ -0,0 +1,35 @@ +name: Manual Deploy + +on: + workflow_dispatch: + inputs: + environment: + description: 'Deploy environment' + type: environment + required: true + tag: + description: 'Tag to deploy (e.g., v1.0.0)' + type: string + required: true + +jobs: + deploy: + name: Deploy + runs-on: ubuntu-latest + environment: + name: ${{ github.event.inputs.environment }} + steps: + - name: Checkout ${{ github.event.inputs.tag }} + uses: actions/checkout@v4 + + - name: Deploying to ${{ github.event.inputs.environment }} + run: echo "Deploy to AppCenter" + + wait_for_approval: + name: Wait for manual testing approval + needs: deploy + runs-on: ubuntu-latest + if: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success' }} + steps: + - name: Wait for approval + run: echo "Deployment approved"