-
Notifications
You must be signed in to change notification settings - Fork 0
562 lines (490 loc) · 22.1 KB
/
cicd.yml
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
name: CICD
concurrency:
group: ${{ github.workflow }}
on:
push:
branches:
- main
permissions:
id-token: write
contents: read
env:
LOCATION: "North Europe"
jobs:
setup:
runs-on: ubuntu-latest
outputs:
app_name: ${{ steps.metadata.outputs.app_name }}
resource_group: ${{ steps.metadata.outputs.resource_group }}
registry_name: ${{ steps.metadata.outputs.registry_name }}
registry_host: ${{ steps.metadata.outputs.registry_host }}
keyvault_name: ${{ steps.metadata.outputs.keyvault_name }}
demo_app_name: ${{ steps.metadata.outputs.demo_app_name }}
demo_app_identity_name: ${{ steps.metadata.outputs.demo_app_identity_name }}
demo_app_image_name: ${{ steps.metadata.outputs.demo_app_image_name }}
lhci_server_name: ${{ steps.metadata.outputs.lhci_server_name }}
lhci_server_identity_name: ${{ steps.metadata.outputs.lhci_server_identity_name }}
lhci_server_image_name: ${{ steps.metadata.outputs.lhci_server_image_name }}
mysql_server_name: ${{ steps.metadata.outputs.mysql_server_name }}
mysql_database_name: ${{ steps.metadata.outputs.mysql_database_name }}
lhci_client_name: ${{ steps.metadata.outputs.lhci_client_name }}
lhci_client_identity_name: ${{ steps.metadata.outputs.lhci_client_identity_name }}
lhci_client_image_name: ${{ steps.metadata.outputs.lhci_client_image_name }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Metadata
id: metadata
run: |
app_name=${{ vars.APP_NAME }}
alphabet_app_name=$(echo "$app_name" | sed 's/-//g')
registry_name=$alphabet_app_name
demo_app_name=$app_name-demo-app
lhci_server_name=$app_name-lhci-server
lhci_client_name=$app_name-lhci-client
short_commit=$(git rev-parse --short HEAD)
echo "app_name=$app_name" >> $GITHUB_OUTPUT
echo "resource_group=$app_name" >> $GITHUB_OUTPUT
echo "registry_name=$registry_name" >> $GITHUB_OUTPUT
echo "registry_host=$registry_name.azurecr.io" >> $GITHUB_OUTPUT
echo "keyvault_name=$app_name-keyvault" >> $GITHUB_OUTPUT
echo "demo_app_name=$demo_app_name" >> $GITHUB_OUTPUT
echo "demo_app_identity_name=$demo_app_name-identity" >> $GITHUB_OUTPUT
echo "demo_app_image_name=demo-app:$short_commit" >> $GITHUB_OUTPUT
echo "lhci_server_name=$lhci_server_name" >> $GITHUB_OUTPUT
echo "lhci_server_identity_name=$lhci_server_name-identity" >> $GITHUB_OUTPUT
echo "lhci_server_image_name=lhci/server:$short_commit" >> $GITHUB_OUTPUT
echo "mysql_server_name=$lhci_server_name-db" >> $GITHUB_OUTPUT
echo "mysql_database_name=lhci-data" >> $GITHUB_OUTPUT
echo "lhci_client_name=$lhci_client_name" >> $GITHUB_OUTPUT
echo "lhci_client_identity_name=$lhci_client_name-identity" >> $GITHUB_OUTPUT
echo "lhci_client_image_name=lhci/client:$short_commit" >> $GITHUB_OUTPUT
- name: Log in to Azure
uses: azure/login@v1
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Create Resource Group
run: |
az group create \
--name ${{ steps.metadata.outputs.resource_group }} \
--location "${{ env.LOCATION }}"
- name: Default Resource Group
run: az config set defaults.group=${{ steps.metadata.outputs.resource_group }}
- name: Create Azure Key Vault
id: keyvault
run: |
id=$(az keyvault list --query "[?name=='${{ steps.metadata.outputs.keyvault_name }}'].id" --output tsv)
if [ -z "$id" ]; then
az keyvault create \
--name ${{ steps.metadata.outputs.keyvault_name }} \
--enable-rbac-authorization true
id=$(az keyvault show --name ${{ steps.metadata.outputs.keyvault_name }} --query id --output tsv)
fi
echo "id=$id" >> $GITHUB_OUTPUT
- name: Assign Key Vault Secrets Officer role to the AAD Application
run: |
az role assignment create \
--assignee ${{ secrets.AZURE_CLIENT_ID }} \
--scope ${{ steps.keyvault.outputs.id }} \
--role "Key Vault Secrets Officer"
- name: Create ACR
run: |
az acr create \
--name ${{ steps.metadata.outputs.registry_name }} \
--sku Basic \
--admin-enabled true
deploy-lighthouse-db:
runs-on: ubuntu-latest
needs: [setup]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to Azure
uses: azure/login@v1
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Default Resource Group
run: az config set defaults.group=${{ needs.setup.outputs.resource_group }}
- name: Create User-assigned Managed Identity
run: az identity create -n ${{ needs.setup.outputs.lhci_server_identity_name }}
- name: Retrieve the Managed Identity ID
id: identity
run: |
identity=$(az identity show \
--name ${{ needs.setup.outputs.lhci_server_identity_name }} \
--output json)
echo "principal_id=$(echo $identity | jq -r '.principalId')" >> $GITHUB_OUTPUT
echo "client_id=$(echo $identity | jq -r '.clientId')" >> $GITHUB_OUTPUT
echo "resource_id=$(echo $identity | jq -r '.id')" >> $GITHUB_OUTPUT
- name: Deploy Database
run: |
az deployment group create \
--template-file ./lighthouse-ci/server/deployment/mysql.bicep \
--parameters \
tenantId=${{ secrets.AZURE_TENANT_ID }} \
userAssignedIdentity=${{ steps.identity.outputs.resource_id }} \
mysqlServerName=${{ needs.setup.outputs.mysql_server_name }} \
mysqlDatabaseName=${{ needs.setup.outputs.mysql_database_name }} \
administratorLogin=$(shuf -zer -n8 {A..Z} {a..z}) \
administratorLoginPassword=$(shuf -zer -n32 {A..Z} {a..z} {0..9}) \
aadAdministratorLogin=${{ needs.setup.outputs.lhci_server_identity_name }} \
aadAdministratorSID=${{ steps.identity.outputs.principal_id }}
build-lighthouse-server:
needs: [setup]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to Azure
uses: azure/login@v1
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Login to ACR
run: az acr login --name ${{ needs.setup.outputs.registry_name }}
- name: Build and Push Docker image to ACR
run: |
az acr build \
--registry ${{ needs.setup.outputs.registry_name }} \
--image ${{ needs.setup.outputs.lhci_server_image_name }} \
./lighthouse-ci/server
deploy-lighthouse-server:
runs-on: ubuntu-latest
needs: [setup, build-lighthouse-server, deploy-lighthouse-db]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to Azure
uses: azure/login@v1
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Default Resource Group
run: az config set defaults.group=${{ needs.setup.outputs.resource_group }}
- name: Create User-assigned Managed Identity
run: az identity create -n ${{ needs.setup.outputs.lhci_server_identity_name }}
- name: Retrieve the Managed Identity ID
id: identity
run: |
identity=$(az identity show \
--name ${{ needs.setup.outputs.lhci_server_identity_name }} \
--output json)
echo "principal_id=$(echo $identity | jq -r '.principalId')" >> $GITHUB_OUTPUT
echo "client_id=$(echo $identity | jq -r '.clientId')" >> $GITHUB_OUTPUT
echo "resource_id=$(echo $identity | jq -r '.id')" >> $GITHUB_OUTPUT
- name: Grant the Managed Identity permission to Pull from ACR
run: |
az role assignment create \
--assignee ${{ steps.identity.outputs.principal_id }} \
--scope $(az acr show -n ${{ needs.setup.outputs.registry_name }} --query id --output tsv) \
--role "AcrPull"
- name: Deploy Container App
run: |
az deployment group create \
--template-file ./lighthouse-ci/server/deployment/container-app.bicep \
--parameters \
userAssignedIdentity=${{ steps.identity.outputs.resource_id }} \
managedIdentityClientId=${{ steps.identity.outputs.client_id }} \
containerAppName=${{ needs.setup.outputs.lhci_server_name }} \
registryHost=${{ needs.setup.outputs.registry_host }} \
imageName=${{ needs.setup.outputs.lhci_server_image_name }} \
mysqlServerName=${{ needs.setup.outputs.mysql_server_name }} \
mysqlDatabaseName=${{ needs.setup.outputs.mysql_database_name }} \
mysqlUser=${{ needs.setup.outputs.lhci_server_identity_name }}
- name: Wait for Container to be Succeeded
run: |
echo "Waiting for container to be provisioned."
while true; do
status=$(az containerapp show \
--name ${{ needs.setup.outputs.lhci_server_name }} \
--query properties.provisioningState \
--output tsv)
if [ "$status" != "InProgress" ]; then
break
fi
sleep 5
done
echo "Container provisioning is completed. Current status: $status"
if [ "$status" != "Succeeded" ]; then
exit 1
fi
create-lighthouse-project:
needs: [setup, deploy-lighthouse-server]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to Azure
uses: azure/login@v1
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Default Resource Group
run: az config set defaults.group=${{ needs.setup.outputs.resource_group }}
- name: Get Lighthouse CI Server Host
id: lhci_server
run: |
echo "host=$(az containerapp show \
--name ${{ needs.setup.outputs.lhci_server_name }} \
--query properties.configuration.ingress.fqdn \
--output tsv)" >> $GITHUB_OUTPUT
- name: Create Lighthouse CI Project
id: create_lhci_project
env:
LHCI_HOST: ${{ steps.lhci_server.outputs.host }}
NAME: ${{ needs.setup.outputs.app_name }}
REPO_URL: ${{ github.event.repository.html_url }}
BASE_BRANCH: ${{ github.event.repository.master_branch }}
SLUG: ${{ github.event.repository.full_name }}
run: |
response=$(bash ./lighthouse-ci/server/deployment/create_lhci_project.sh)
token=$(echo $response | jq -r '.token // empty')
adminToken=$(echo $response | jq -r '.adminToken // empty')
echo "::add-mask::$token"
echo "::add-mask::$adminToken"
echo "token=$token" >> $GITHUB_OUTPUT
echo "adminToken=$adminToken" >> $GITHUB_OUTPUT
- name: Create token and adminToken as Azure Key Vault Secrets if not nulls
run: |
if [ -n "${{ steps.create_lhci_project.outputs.token }}" ]; then
az keyvault secret set \
--vault-name ${{ needs.setup.outputs.keyvault_name }} \
--name "LHCI-TOKEN" \
--value "${{ steps.create_lhci_project.outputs.token }}"
fi
if [ -n "${{ steps.create_lhci_project.outputs.adminToken }}" ]; then
az keyvault secret set \
--vault-name ${{ needs.setup.outputs.keyvault_name }} \
--name "LHCI-ADMIN-TOKEN" \
--value "${{ steps.create_lhci_project.outputs.adminToken }}"
fi
build-demo-app:
needs: [setup]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to Azure
uses: azure/login@v1
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Login to ACR
run: az acr login --name ${{ needs.setup.outputs.registry_name }}
- name: Build and Push Docker image to ACR
run: |
az acr build \
--registry ${{ needs.setup.outputs.registry_name }} \
--image ${{ needs.setup.outputs.demo_app_image_name }} \
./demo-app
deploy-demo-app-staging:
runs-on: ubuntu-latest
needs: [setup, build-demo-app]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to Azure
uses: azure/login@v1
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Default Resource Group
run: az config set defaults.group=${{ needs.setup.outputs.resource_group }}
- name: Create User-assigned Managed Identity
run: az identity create --name ${{ needs.setup.outputs.demo_app_identity_name }}
- name: Retrieve the Managed Identity IDs
id: identity
run: |
identity=$(az identity show \
--name ${{ needs.setup.outputs.demo_app_identity_name }} \
--output json)
echo "principal_id=$(echo $identity | jq -r '.principalId')" >> $GITHUB_OUTPUT
echo "client_id=$(echo $identity | jq -r '.clientId')" >> $GITHUB_OUTPUT
echo "resource_id=$(echo $identity | jq -r '.id')" >> $GITHUB_OUTPUT
- name: Grant the Managed Identity permission to Pull from ACR
run: |
scope=$(az acr show \
--name ${{ needs.setup.outputs.registry_name }} \
--query id \
--output tsv)
az role assignment create \
--assignee ${{ steps.identity.outputs.principal_id }} \
--scope $scope \
--role "AcrPull"
- name: Get production revision id
id: production_revision
env:
RESOURCE_GROUP_NAME: ${{ needs.setup.outputs.resource_group }}
CONTAINER_APP_NAME: ${{ needs.setup.outputs.demo_app_name }}
run: echo "production_revision=$(bash ./demo-app/deployment/get_production_revision.sh)" >> $GITHUB_OUTPUT
- name: Deploy Container App
run: |
az deployment group create \
--template-file ./demo-app/deployment/container-app.bicep \
--parameters \
userAssignedIdentity=${{ steps.identity.outputs.resource_id }} \
containerAppName=${{ needs.setup.outputs.demo_app_name }} \
registryHost=${{ needs.setup.outputs.registry_host }} \
imageName=${{ needs.setup.outputs.demo_app_image_name }} \
productionRevision=${{ steps.production_revision.outputs.production_revision }}
- name: Set staging label to latest revision
env:
RESOURCE_GROUP_NAME: ${{ needs.setup.outputs.resource_group }}
CONTAINER_APP_NAME: ${{ needs.setup.outputs.demo_app_name }}
run: bash ./demo-app/deployment/set_staging_label.sh
build-lighthouse-client:
needs: [setup]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to Azure
uses: azure/login@v1
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Login to ACR
run: az acr login --name ${{ needs.setup.outputs.registry_name }}
- name: Build and Push Docker image to ACR
run: |
az acr build \
--registry ${{ needs.setup.outputs.registry_name }} \
--image ${{ needs.setup.outputs.lhci_client_image_name }} \
./lighthouse-ci/client
deploy-lighthouse-client:
runs-on: ubuntu-latest
needs:
[
setup,
build-lighthouse-client,
create-lighthouse-project,
deploy-demo-app-staging,
]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to Azure
uses: azure/login@v1
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Default Resource Group
run: az config set defaults.group=${{ needs.setup.outputs.resource_group }}
- name: Create User-assigned Managed Identity
run: az identity create -n ${{ needs.setup.outputs.lhci_client_identity_name }}
- name: Retrieve the Managed Identity ID
id: identity
run: |
identity=$(az identity show \
--name ${{ needs.setup.outputs.lhci_client_identity_name }} \
--output json)
echo "principal_id=$(echo $identity | jq -r '.principalId')" >> $GITHUB_OUTPUT
echo "client_id=$(echo $identity | jq -r '.clientId')" >> $GITHUB_OUTPUT
echo "resource_id=$(echo $identity | jq -r '.id')" >> $GITHUB_OUTPUT
- name: Grant the Managed Identity permission to Pull from ACR
run: |
az role assignment create \
--assignee ${{ steps.identity.outputs.principal_id }} \
--scope $(az acr show -n ${{ needs.setup.outputs.registry_name }} --query id --output tsv) \
--role "AcrPull"
- name: Get Demo app staging URL
id: staging
run: |
fqdn=$(az containerapp show \
--name ${{ needs.setup.outputs.demo_app_name }} \
--query properties.configuration.ingress.fqdn \
--output tsv)
prefix=$(echo "$fqdn" | cut -d'.' -f1)
suffix=$(echo "$fqdn" | cut -d'.' -f2-)
host="${prefix}---staging.${suffix}"
echo "host=$host" >> $GITHUB_OUTPUT
- name: Get Lighthouse CI Server Host
id: lhci_server
run: |
echo "host=$(az containerapp show \
--name ${{ needs.setup.outputs.lhci_server_name }} \
--query properties.configuration.ingress.fqdn \
--output tsv)" >> $GITHUB_OUTPUT
- name: Get Lightouse CI Build Token
id: lhci_token
run: |
token=$(az keyvault secret show \
--vault-name ${{ needs.setup.outputs.keyvault_name }} \
--name "LHCI-TOKEN" \
--query value \
--output tsv)
echo "::add-mask::$token"
echo "token=$token" >> $GITHUB_OUTPUT
- name: Deploy Container App
run: |
az deployment group create \
--template-file ./lighthouse-ci/client/deployment/container-instance.bicep \
--parameters \
userAssignedIdentity=${{ steps.identity.outputs.resource_id }} \
containerInstanceName=${{ needs.setup.outputs.lhci_client_name }} \
registryHost=${{ needs.setup.outputs.registry_host }} \
imageName=${{ needs.setup.outputs.lhci_client_image_name }} \
URL=https://${{ steps.staging.outputs.host }} \
LHCI_SERVER=https://${{ steps.lhci_server.outputs.host }} \
LHCI_TOKEN=${{ steps.lhci_token.outputs.token }} \
LHCI_BUILD_CONTEXT__GIT_REMOTE=${{ github.event.repository.html_url }} \
LHCI_BUILD_CONTEXT__GITHUB_REPO_SLUG=${{ github.event.repository.full_name }} \
LHCI_BUILD_CONTEXT__CURRENT_HASH=${{ github.sha }} \
LHCI_BUILD_CONTEXT__ANCESTOR_HASH=${{ github.event.before }} \
LHCI_BUILD_CONTEXT__COMMIT_TIME=${{ github.event.head_commit.timestamp }} \
LHCI_BUILD_CONTEXT__CURRENT_BRANCH=${{ github.event.repository.default_branch }} \
LHCI_BUILD_CONTEXT__COMMIT_MESSAGE="${{ github.event.head_commit.message }}" \
LHCI_BUILD_CONTEXT__AUTHOR="${{ github.event.head_commit.author.name }} <${{ github.event.head_commit.author.email }}>" \
LHCI_BUILD_CONTEXT__EXTERNAL_BUILD_URL=${{ github.event.head_commit.url }}
- name: Lighthouse Client results
run: |
echo "Waiting for Lighthouse Client"
while true; do
status=$(az container show \
--name ${{ needs.setup.outputs.lhci_client_name }} \
--query instanceView.state \
--output tsv)
if [[ ! "$status" =~ ^(Pending|Running)$ ]]; then
break
fi
sleep 5
done
echo "Lighthouse Client is completed. Current status: $status"
if [ "$status" != "Succeeded" ]; then
exit 1
fi
swap-demo-app-production:
runs-on: ubuntu-latest
needs: [setup, deploy-lighthouse-client]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to Azure
uses: azure/login@v1
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Default Resource Group
run: az config set defaults.group=${{ needs.setup.outputs.resource_group }}
- name: Swap production and staging
env:
RESOURCE_GROUP_NAME: ${{ needs.setup.outputs.resource_group }}
CONTAINER_APP_NAME: ${{ needs.setup.outputs.demo_app_name }}
run: bash ./demo-app/deployment/swap_staging_production.sh
- name: Inactive old revisions
env:
RESOURCE_GROUP_NAME: ${{ needs.setup.outputs.resource_group }}
CONTAINER_APP_NAME: ${{ needs.setup.outputs.demo_app_name }}
run: bash ./demo-app/deployment/inactive_old_revisions.sh