-
Notifications
You must be signed in to change notification settings - Fork 1
116 lines (109 loc) · 4.09 KB
/
dispatch.yml
File metadata and controls
116 lines (109 loc) · 4.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
name: Dispatch ⛟
permissions:
id-token: write
contents: write
issues: write
on:
workflow_dispatch:
inputs:
environment:
type: environment
required: true
description: Environment to deploy to
DEPLOY_BACKEND:
type: boolean
required: true
default: true
description: DEPLOY_BACKEND
DEPLOY_FEATURES_API:
type: boolean
required: true
default: false
description: DEPLOY_FEATURES_API
DEPLOY_ROUTES:
type: boolean
required: true
default: false
description: DEPLOY_ROUTES
DEPLOY_SM2A:
type: boolean
required: true
default: false
description: DEPLOY_SM2A
DEPLOY_MONITORING:
type: boolean
required: true
default: false
description: DEPLOY_MONITORING
DEPLOY_TITILER_MULTIDIM:
type: boolean
required: true
default: false
description: DEPLOY_TITILER_MULTIDIM
DEPLOY_S3_DISASTER_RECOVERY:
type: boolean
required: true
default: false
description: DEPLOY_S3_DISASTER_RECOVERY
DEPLOY_TITILER_CMR:
type: boolean
required: true
default: false
description: DEPLOY_TITILER_CMR
run-name: |
Dispatch to ${{ inputs.environment }}
BACKEND=${{ inputs.DEPLOY_BACKEND }}
FEATURES=${{ inputs.DEPLOY_FEATURES_API }}
ROUTES=${{ inputs.DEPLOY_ROUTES }}
SM2A=${{ inputs.DEPLOY_SM2A }}
MONITORING=${{ inputs.DEPLOY_MONITORING }}
TITILER_MULTIDIM=${{ inputs.DEPLOY_TITILER_MULTIDIM }}
TITILER_CMR=${{ inputs.DEPLOY_TITILER_CMR }} ⛟
env:
DEPLOY_BACKEND: ${{ github.event.inputs.DEPLOY_BACKEND }}
DEPLOY_FEATURES_API: ${{ github.event.inputs.DEPLOY_FEATURES_API }}
DEPLOY_ROUTES: ${{ github.event.inputs.DEPLOY_ROUTES }}
DEPLOY_SM2A: ${{ github.event.inputs.DEPLOY_SM2A }}
DEPLOY_MONITORING: ${{ github.event.inputs.DEPLOY_MONITORING }}
DEPLOY_TITILER_MULTIDIM: ${{ github.event.inputs.DEPLOY_TITILER_MULTIDIM }}
DEPLOY_S3_DISASTER_RECOVERY: ${{ github.event.inputs.DEPLOY_S3_DISASTER_RECOVERY }}
DEPLOY_TITILER_CMR: ${{ github.event.inputs.DEPLOY_TITILER_CMR }}
jobs:
check-environment:
runs-on: ubuntu-latest
name: Got ${{ github.event.inputs.environment }}
steps:
- name: Validation
uses: trstringer/manual-approval@v1
if: ${{ github.event.inputs.environment == 'ghgc-mcp-production-blue' || github.event.inputs.environment == 'mcp-prod' }}
timeout-minutes: 60 # The approver will have 1 hour to approve this request
# Why 1h? Because GitHub App tokens expire after 1 hour which implies duration
# for the approval cannot exceed 60 minutes or the job will fail due to bad credentials
with:
secret: ${{ secrets.GITHUB_TOKEN }}
approvers: amarouane-ABDELHAK,slesaad,anayeaye,smohiudd,botanical,ividito,stephenkilbourn,sandrahoang686,aliziel
minimum-approvals: 1
issue-title: "Deploying to ${{ github.event.inputs.environment }}"
issue-body: "Please approve or deny the deployment"
deploy-veda-components:
name: Deploy VEDA Components
uses: "./.github/workflows/deploy.yml"
needs: check-environment
with:
environment: ${{ github.event.inputs.environment }}
DEPLOY_BACKEND: ${{ github.event.inputs.DEPLOY_BACKEND }}
DEPLOY_FEATURES_API: ${{ github.event.inputs.DEPLOY_FEATURES_API }}
DEPLOY_ROUTES: ${{ github.event.inputs.DEPLOY_ROUTES }}
DEPLOY_SM2A: ${{ github.event.inputs.DEPLOY_SM2A }}
DEPLOY_MONITORING: ${{ github.event.inputs.DEPLOY_MONITORING }}
DEPLOY_TITILER_MULTIDIM: ${{ github.event.inputs.DEPLOY_TITILER_MULTIDIM }}
DEPLOY_S3_DISASTER_RECOVERY: ${{ github.event.inputs.DEPLOY_S3_DISASTER_RECOVERY }}
DEPLOY_TITILER_CMR: ${{ github.event.inputs.DEPLOY_TITILER_CMR }}
secrets: inherit
update-deployment-status:
name: Update Deployment Status
uses: "./.github/workflows/update_deployment_status.yml"
needs: deploy-veda-components
with:
environment: ${{ github.event.inputs.environment }}
secrets: inherit