From a61f788e4f0304bee36e02e99a95e147cdd3403d Mon Sep 17 00:00:00 2001 From: bengo <171782+gobengo@users.noreply.github.com> Date: Mon, 13 Nov 2023 11:35:21 -0800 Subject: [PATCH] ci: .github/workflows/api.yml has workflow_dispatch manual trigger --- .github/workflows/api.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/api.yml b/.github/workflows/api.yml index d8220734ce..9e8aa2e544 100644 --- a/.github/workflows/api.yml +++ b/.github/workflows/api.yml @@ -14,6 +14,19 @@ on: - 'packages/db/**' - '.github/workflows/api.yml' - 'package-lock.json' + workflow_dispatch: + inputs: + force_deploy_staging: + description: whether to deploy to staging even if the job wouldn't normally run + required: true + type: boolean + default: false + force_deploy_production: + description: whether to deploy to production even if the job wouldn't normally run + required: true + type: boolean + default: false + jobs: test: runs-on: ubuntu-latest @@ -52,7 +65,7 @@ jobs: deploy-staging: name: Deploy Staging - if: github.event_name == 'push' && github.ref == 'refs/heads/main' + if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || inputs.force_deploy_staging runs-on: ubuntu-latest needs: test environment: @@ -88,7 +101,7 @@ jobs: deploy-production: name: Deploy Production - if: (github.event_name == 'push' && github.ref == 'refs/heads/main' && needs.changelog.outputs.releases_created) || inputs.force_release + if: (github.event_name == 'push' && github.ref == 'refs/heads/main' && needs.changelog.outputs.releases_created) || inputs.force_deploy_production runs-on: ubuntu-latest needs: - test