Skip to content

Commit

Permalink
chore: remove deployment window
Browse files Browse the repository at this point in the history
  • Loading branch information
chris13524 committed Mar 17, 2024
1 parent 76ad161 commit 5c595e6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 30 deletions.
1 change: 0 additions & 1 deletion .github/workflows/dispatch_deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,3 @@ jobs:
deploy-app: ${{ inputs.deploy-app }}
deploy-prod: ${{ inputs.stage == 'prod' }}
version: ${{ needs.select_version.outputs.version }}
skip_window: true
1 change: 0 additions & 1 deletion .github/workflows/dispatch_publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,3 @@ jobs:
deploy-app: true
deploy-prod: ${{ inputs.deploy-to == 'prod' }}
version: ${{ needs.update_version.outputs.version }}
skip_window: true
33 changes: 5 additions & 28 deletions .github/workflows/sub-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,13 @@ on:
type: boolean
default: true
deploy-prod:
description: "Deploy to production after successful deployment to staging"
description: "Deploy to production"
type: boolean
default: false
version:
description: "The release version"
type: string
required: true
skip_window:
description: "Skip deployment window"
type: boolean
default: false

concurrency: cd

Expand Down Expand Up @@ -63,30 +59,11 @@ jobs:
stage: staging
stage-url: https://staging.${{ vars.SUBDOMAIN_NAME }}.walletconnect.com/health

deployment_window:
name: Deployment Window
if: ${{ inputs.deploy-prod }}
runs-on: ubuntu-latest
environment:
name: prod
url: https://${{ vars.SUBDOMAIN_NAME }}.walletconnect.com/health
steps:
- id: decide
uses: WalletConnect/actions/deploy-window/@2.1.4
with:
earliest-hour: "9"
latest-hour: "17"
latest-weekday: "5"
time-zone: UTC
force-deploy-phrase: force deploy
outputs:
result: ${{ steps.decide.outputs.deploy_or_not == 'yes' || inputs.skip_window }}

deploy-infra-prod:
name: Deploy Infra Prod
uses: ./.github/workflows/sub-infra-apply.yml
if: ${{ always() && !failure() && !cancelled() && inputs.deploy-infra && inputs.deploy-prod && needs.deployment_window.outputs.result == 'true' }}
needs: [validate-staging, deployment_window]
if: ${{ always() && !failure() && !cancelled() && inputs.deploy-infra && inputs.deploy-prod }}
needs: [validate-staging]
secrets: inherit
with:
version: ${{ inputs.version }}
Expand All @@ -96,8 +73,8 @@ jobs:
deploy-app-prod:
name: Deploy App Prod
uses: ./.github/workflows/sub-app-deploy.yml
if: ${{ always() && !failure() && !cancelled() && inputs.deploy-app && inputs.deploy-prod && needs.deployment_window.outputs.result == 'true' }}
needs: [validate-staging, deployment_window, deploy-infra-prod]
if: ${{ always() && !failure() && !cancelled() && inputs.deploy-app && inputs.deploy-prod }}
needs: [validate-staging, deploy-infra-prod]
with:
version: ${{ inputs.version }}
stage: prod
Expand Down

0 comments on commit 5c595e6

Please sign in to comment.