Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove deployment window #184

Merged
merged 1 commit into from
Mar 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading