forked from Azure/container-apps-deploy-action
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
724 lines (652 loc) · 39.3 KB
/
action.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
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
name: 'Azure Container Apps Build and Deploy'
description: |
'GitHub Action for building and deploying Azure Container Apps'
branding:
icon: "login.svg"
color: "blue"
inputs:
appSourcePath:
description: 'Absolute path on the GitHub runner of the source application code to be built.'
required: false
acrName:
description: 'The name of the Azure Container Registry that the runnable application image will be pushed to.'
required: false
acrUsername:
description: |
'The username used to authenticate push requests to the provided Azure Container Registry. If not provided, an
access token will be generated via "az acr login" and provided to "docker login" to authenticate the requests.'
required: false
acrPassword:
description: |
'The password used to authenticate push requests to the provided Azure Container Registry. If not provided, an
access token will be generated via "az acr login" and provided to "docker login" to authenticate the requests.'
required: false
registryUrl:
description: 'The base URL of the Container Registry that the runnable application image will be pushed to.'
required: false
registryUsername:
description: 'The username used to authenticate push requests to the provided Container Registry using the "docker login" action.'
required: false
registryPassword:
description: 'The password used to authenticate push requests to the provided Container Registry using the "docker login" action.'
required: false
azureCredentials:
description: |
'Azure credentials used by the `azure/login` action to authenticate Azure CLI requests if the user has not
previously authenticated in the workflow calling this action.'
required: false
imageToBuild:
description: |
'The custom name of the image that is to be built, pushed to the Container Registry and deployed to the Container App by this action.
Note: this image name should include the registry server; e.g., <registryUrl>/<repo>:<tag>. If this argument is
not provided, a default image name will be constructed in the form of
<acr-name>.azurecr.io/github-action/container-app:<github-run-id>.<github-run-attempt>.'
required: false
imageToDeploy:
description: |
'The custom name of an image that has already been pushed to the Container Registry and will be deployed to the Container App by this
action. Note: this image name should include the registry server; e.g., <registryUrl>/<repo>:<tag>. If this
argument is not provided, the value provided (or determined) for the "imageToBuild" argument will be used.'
required: false
dockerfilePath:
description: |
'Relative path to the Dockerfile in the provided application source that should be used to build the image that is
then pushed to the Container Registry and deployed to the Container App. If not provided, this action will check if there is a file
named "Dockerfile" in the provided application source and use that to build the image. Otherwise, the Oryx++
Builder will be used to create the image.'
required: false
containerAppName:
description: |
'The name of the Azure Container App that will be created or updated. If not provided, this value will be
gh-action-app-<github-run-id>-<github-run-attempt>.'
required: false
default: 'gh-action-app-${{ github.run_id }}-${{ github.run_attempt }}'
resourceGroup:
description: |
'The existing resource group that the Azure Container App will be created in. If not provided, this value will be
<container-app-name>-rg and its existence will first be checked before attempting to create it.'
required: false
containerAppEnvironment:
description: |
'The name of the Azure Container App environment to use with the application. If not provided, an existing
environment in the resource group of the Container App will be used, otherwise, an environment will be created in
the format <container-app-name>-env'
required: false
runtimeStack:
description: |
'The platform version stack that the application runs in when deployed to the Azure Container App. This should
be provided in the format <platform>:<version>. If not provided, this value is determined by Oryx based on the
contents of the provided application. Please view the following document for more information on the supported
runtime stacks for Oryx:
https://github.com/microsoft/Oryx/blob/main/doc/supportedRuntimeVersions.md'
required: false
builderStack:
description: |
'The stack (OS) that should be used to build the provided application source and produce the runnable application
image. You can provide a specific image tag for the stack, such as "debian-bullseye-20231004.1", or you can
provide a supported stack name, such as "debian-bookworm" or "debian-bullseye", and the latest supported image tag
for that stack will be used. If no stack is provided, this action will attempt to build the provided application
source with each supported stack until there's a successful build.'
required: false
targetPort:
description: |
'The designated port for the application to run on. If no value is provided and the builder is used to build the
runnable application image, the target port will be set to 80 for Python applications and 8080 for all other
platform applications. If no value is provided when creating a Container App, the target port will be set to 80 by
default. Note: when using this action to update a Container App, the target port may be updated if not provided
based on changes to the ingress property.
required: false
location:
description: |
'The location that the Container App (and other created resources) will be deployed to. To view locations suitable
for creating the Container App in, please run the following: az provider show -n Microsoft.App --query "resourceTypes[?resourceType=='containerApps'].locations"'
required: false
environmentVariables:
description: |
'A list of environment variable(s) for the container. Space-separated values in 'key=value' format. Empty string
to clear existing values. Prefix value with 'secretref:' to reference a secret.'
required: false
ingress:
description: |
'Possible options: external, internal, disabled. If set to "external" (default value if not provided when creating
a Container App), the Container App will be visible from the internet or a VNET, depending on the app environment
endpoint configured. If set to "internal", the Container App will be visible from within the app environment only.
If set to "disabled", ingress will be disabled for this Container App and will not have an HTTP or TCP endpoint.'
required: false
yamlConfigPath:
description: |
'Full path (on the executing GitHub runner) to the YAML file detailing the configuration of the Container App.
The 'resourceGroup' property in the YAML file will not be used; the value for this either comes from the
'resourceGroup' argument provided to the action, or the default resource group name generated by the action.
Image and application source arguments (e.g., 'appSourcePath', 'imageToDeploy') will still be used to first build
and/or push an image that is used by the Container App; in this case, the provided YAML configuration file will
need to reference the image specified by 'imageToDeploy' (or 'imageToBuild', depending on your scenario). When
creating a new Container App, all properties listed in the file will be set when the Container App is created.
When updating an existing Container App, only the properties listed in the file will be updated on the Container
App. For more information on the structure of this YAML configuration file, please visit
https://aka.ms/azure-container-apps-yaml'
disableTelemetry:
description: |
'If set to "true", no telemetry will be collected by this GitHub Action. If set to "false", or if this argument is
not provided, telemetry will be sent to Microsoft about the Container App build and deploy scenario targeted by
this GitHub Action.'
required: false
default: false
runs:
using: "composite"
steps:
- name: Start timer to track action execution length, in milliseconds
if: ${{ always() && inputs.disableTelemetry == 'false' }}
shell: bash
run: |
CA_GH_ACTION_START_MILLISECONDS=$(date +%s%N | cut -b1-13)
echo "CA_GH_ACTION_START_MILLISECONDS=${CA_GH_ACTION_START_MILLISECONDS}" >> $GITHUB_ENV
CA_GH_ACTION_RESULT_ARG="--property 'result=failed'"
echo "CA_GH_ACTION_RESULT_ARG=${CA_GH_ACTION_RESULT_ARG}" >> $GITHUB_ENV
- name: Check that an ACR name and a registry URL are not provided together
if: ${{ inputs.acrName != '' && inputs.registryUrl != '' }}
shell: bash
run: |
echo "Both 'acrName' and 'registryUrl' arguments cannot be provided together."
exit 1
- name: Check for ACR name or any other registry url provided with application source path
if: ${{ inputs.appSourcePath != '' && inputs.acrName == '' && inputs.registryUrl == '' }}
shell: bash
run: |
echo "The 'acrName' argument or the 'registryUrl' argument must also be provided if the 'appSourcePath' argument is provided."
exit 1
- name: Check for application source path, a previously built image or a YAML configuration file
if: ${{ inputs.appSourcePath == '' && inputs.imageToDeploy == '' && inputs.yamlConfigPath == '' }}
shell: bash
run: |
echo "One of the following arguments must be provided: appSourcePath, imageToDeploy, yamlConfigPath"
exit 1
- name: Check if the YAML configuration file is provided
if: ${{ inputs.yamlConfigPath != '' }}
shell: bash
run: |
CA_GH_ACTION_YAML_PROVIDED=true
echo "CA_GH_ACTION_YAML_PROVIDED=${CA_GH_ACTION_YAML_PROVIDED}" >> $GITHUB_ENV
- name: Check if only the YAML configuration file is being used
if: ${{ inputs.appSourcePath == '' && inputs.imageToDeploy == '' && inputs.yamlConfigPath != '' }}
shell: bash
run: |
CA_GH_ACTION_ONLY_YAML=true
echo "CA_GH_ACTION_ONLY_YAML=${CA_GH_ACTION_ONLY_YAML}" >> $GITHUB_ENV
- name: Set Azure CLI to dynamically install missing extensions
shell: bash
run: az config set extension.use_dynamic_install=yes_without_prompt
- name: Log in to Azure
if: ${{ inputs.azureCredentials != '' }}
uses: azure/login@v1
with:
creds: ${{ inputs.azureCredentials }}
- name: Log in to Azure Container Registry
uses: docker/[email protected]
if: ${{ inputs.acrName != '' && inputs.acrUsername != '' && inputs.acrPassword != '' }}
with:
registry: ${{ inputs.acrName }}.azurecr.io
username: ${{ inputs.acrUsername }}
password: ${{ inputs.acrPassword }}
- name: Log in to Container Registry
uses: docker/[email protected]
if: ${{ inputs.registryUrl != '' && inputs.registryUsername != '' && inputs.registryPassword != '' }}
with:
registry: ${{ inputs.registryUrl }}
username: ${{ inputs.registryUsername }}
password: ${{ inputs.registryPassword }}
- name: Export Container Registry information to environment variable
if: ${{ inputs.registryUrl != '' && inputs.registryUsername != '' && inputs.registryPassword != '' && env.CA_GH_ACTION_ONLY_YAML != 'true' }}
shell: bash
run: |
CA_GH_ACTION_REGISTRY_LOGIN_ARG="--registry-server ${{ inputs.registryUrl }} --registry-username ${{ inputs.registryUsername }} --registry-password ${{ inputs.registryPassword }}"
CA_GH_ACTION_REGISTRY_URL=${{ inputs.registryUrl }}
CA_GH_ACTION_REGISTRY_USERNAME=${{ inputs.registryUsername }}
CA_GH_ACTION_REGISTRY_PASSWORD=${{ inputs.registryPassword }}
echo "CA_GH_ACTION_REGISTRY_LOGIN_ARG=${CA_GH_ACTION_REGISTRY_LOGIN_ARG}" >> $GITHUB_ENV
echo "CA_GH_ACTION_REGISTRY_URL=${CA_GH_ACTION_REGISTRY_URL}" >> $GITHUB_ENV
echo "CA_GH_ACTION_REGISTRY_USERNAME=${CA_GH_ACTION_REGISTRY_USERNAME}" >> $GITHUB_ENV
echo "CA_GH_ACTION_REGISTRY_PASSWORD=${CA_GH_ACTION_REGISTRY_PASSWORD}" >> $GITHUB_ENV
- name: Export Azure Container Registry information to environment variable for Azure CLI command
if: ${{ inputs.acrName != '' && inputs.acrUsername != '' && inputs.acrPassword != '' && env.CA_GH_ACTION_ONLY_YAML != 'true' }}
shell: bash
run: |
CA_GH_ACTION_REGISTRY_LOGIN_ARG="--registry-server ${{ inputs.acrName }}.azurecr.io --registry-username ${{ inputs.acrUsername }} --registry-password ${{ inputs.acrPassword }}"
CA_GH_ACTION_REGISTRY_URL=${{ inputs.acrName }}.azurecr.io
CA_GH_ACTION_REGISTRY_USERNAME=${{ inputs.acrUsername }}
CA_GH_ACTION_REGISTRY_PASSWORD=${{ inputs.acrPassword }}
echo "CA_GH_ACTION_REGISTRY_LOGIN_ARG=${CA_GH_ACTION_REGISTRY_LOGIN_ARG}" >> $GITHUB_ENV
echo "CA_GH_ACTION_REGISTRY_URL=${CA_GH_ACTION_REGISTRY_URL}" >> $GITHUB_ENV
echo "CA_GH_ACTION_REGISTRY_USERNAME=${CA_GH_ACTION_REGISTRY_USERNAME}" >> $GITHUB_ENV
echo "CA_GH_ACTION_REGISTRY_PASSWORD=${CA_GH_ACTION_REGISTRY_PASSWORD}" >> $GITHUB_ENV
- name: Get access token to log in to Azure Container Registry
if: ${{ inputs.acrName != '' && (inputs.acrUsername == '' || inputs.acrPassword == '') }}
shell: bash
run: |
CA_GH_ACTION_ACR_ACCESS_TOKEN=$(az acr login --name ${{ inputs.acrName }} --output json --expose-token | jq -r '.accessToken')
echo "CA_GH_ACTION_ACR_ACCESS_TOKEN=${CA_GH_ACTION_ACR_ACCESS_TOKEN}" >> $GITHUB_ENV
docker login ${{ inputs.acrName }}.azurecr.io -u 00000000-0000-0000-0000-000000000000 -p $CA_GH_ACTION_ACR_ACCESS_TOKEN
CA_GH_ACTION_REGISTRY_URL=${{ inputs.acrName }}.azurecr.io
echo "CA_GH_ACTION_REGISTRY_URL=${CA_GH_ACTION_REGISTRY_URL}" >> $GITHUB_ENV
- name: Export Dockerfile path to environment variable
if: ${{ inputs.appSourcePath != '' && inputs.dockerfilePath != '' }}
shell: bash
run: |
CA_GH_ACTION_DOCKERFILE_PATH="${{ inputs.appSourcePath }}/${{ inputs.dockerfilePath }}"
echo "CA_GH_ACTION_DOCKERFILE_PATH=${CA_GH_ACTION_DOCKERFILE_PATH}" >> $GITHUB_ENV
- name: Check for existing Dockerfile in application source
if: ${{ inputs.appSourcePath != '' && inputs.dockerfilePath == '' }}
shell: bash
run: |
dockerfilePath=${{ inputs.appSourcePath }}/Dockerfile
if [ -f "$dockerfilePath" ]; then echo "CA_GH_ACTION_DOCKERFILE_PATH=${dockerfilePath}" >> $GITHUB_ENV; fi
- name: Export name of image to build to environment variable
if: ${{ inputs.imageToBuild != '' && env.CA_GH_ACTION_ONLY_YAML != 'true' }}
shell: bash
run: |
CA_GH_ACTION_IMAGE_TO_BUILD="${{ inputs.imageToBuild }}"
echo "CA_GH_ACTION_IMAGE_TO_BUILD=${CA_GH_ACTION_IMAGE_TO_BUILD}" >> $GITHUB_ENV
- name: Determine name of image to build if not provided
if: ${{ env.CA_GH_ACTION_REGISTRY_URL != '' && inputs.imageToBuild == '' && env.CA_GH_ACTION_ONLY_YAML != 'true' }}
shell: bash
run: |
CA_GH_ACTION_IMAGE_TO_BUILD="${{ env.CA_GH_ACTION_REGISTRY_URL }}/github-action/container-app:${{ github.run_id }}.${{ github.run_attempt }}"
echo "CA_GH_ACTION_IMAGE_TO_BUILD=${CA_GH_ACTION_IMAGE_TO_BUILD}" >> $GITHUB_ENV
- name: Export name of image to deploy to environment variable
if: ${{ inputs.imageToDeploy != '' }}
shell: bash
run: |
CA_GH_ACTION_IMAGE_TO_DEPLOY="${{ inputs.imageToDeploy }}"
echo "CA_GH_ACTION_IMAGE_TO_DEPLOY=${CA_GH_ACTION_IMAGE_TO_DEPLOY}" >> $GITHUB_ENV
- name: Update name of image to deploy if not provided
if: ${{ inputs.imageToDeploy == '' && env.CA_GH_ACTION_ONLY_YAML != 'true' }}
shell: bash
run: |
CA_GH_ACTION_IMAGE_TO_DEPLOY="${{ env.CA_GH_ACTION_IMAGE_TO_BUILD }}"
echo "CA_GH_ACTION_IMAGE_TO_DEPLOY=${CA_GH_ACTION_IMAGE_TO_DEPLOY}" >> $GITHUB_ENV
- name: Export resource group to environment variable
if: ${{ inputs.resourceGroup != '' }}
shell: bash
run: |
CA_GH_ACTION_RESOURCE_GROUP="${{ inputs.resourceGroup }}"
echo "CA_GH_ACTION_RESOURCE_GROUP=${CA_GH_ACTION_RESOURCE_GROUP}" >> $GITHUB_ENV
- name: Determine resource group if not provided
if: ${{ inputs.resourceGroup == '' }}
shell: bash
run: |
CA_GH_ACTION_RESOURCE_GROUP="${{ inputs.containerAppName }}-rg"
echo "CA_GH_ACTION_RESOURCE_GROUP=${CA_GH_ACTION_RESOURCE_GROUP}" >> $GITHUB_ENV
- name: Check if the previously generated resource group exists
if: ${{ inputs.resourceGroup == '' }}
shell: bash
run: |
az group show \
-n ${{ env.CA_GH_ACTION_RESOURCE_GROUP }} \
-o none && CA_GH_ACTION_RG_EXISTS=true || CA_GH_ACTION_RG_EXISTS=false
echo "CA_GH_ACTION_RG_EXISTS=${CA_GH_ACTION_RG_EXISTS}" >> $GITHUB_ENV
- name: Get default location for Container Apps to use if resource group doesn't exist and location wasn't provided
if: ${{ env.CA_GH_ACTION_RG_EXISTS == 'false' && inputs.location == '' }}
shell: bash
run: |
CA_GH_ACTION_DEFAULT_LOCATION=$(az provider show -n Microsoft.App --query "resourceTypes[?resourceType=='containerApps'].locations[] | [0]")
CA_GH_ACTION_DEFAULT_LOCATION=$(echo $CA_GH_ACTION_DEFAULT_LOCATION | sed 's/[ !()]//g')
CA_GH_ACTION_DEFAULT_LOCATION=${CA_GH_ACTION_DEFAULT_LOCATION,,}
echo "CA_GH_ACTION_DEFAULT_LOCATION=${CA_GH_ACTION_DEFAULT_LOCATION}" >> $GITHUB_ENV
- name: Set default location for Container Apps if location was provided
if: ${{ env.CA_GH_ACTION_RG_EXISTS == 'false' && inputs.location != '' }}
shell: bash
run: |
CA_GH_ACTION_DEFAULT_LOCATION="${{ inputs.location }}"
echo "CA_GH_ACTION_DEFAULT_LOCATION=${CA_GH_ACTION_DEFAULT_LOCATION}" >> $GITHUB_ENV
- name: Create resource group if it doesn't exist
if: ${{ env.CA_GH_ACTION_RG_EXISTS == 'false' }}
shell: bash
run: |
az group create \
-n ${{ env.CA_GH_ACTION_RESOURCE_GROUP }} \
-l ${{ env.CA_GH_ACTION_DEFAULT_LOCATION }}
- name: Export location argument to environment variable
if: ${{ inputs.location != '' && env.CA_GH_ACTION_YAML_PROVIDED != 'true' }}
shell: bash
run: |
CA_GH_ACTION_CONTAINER_APP_LOCATION_ARG="--location ${{ inputs.location }}"
echo "CA_GH_ACTION_CONTAINER_APP_LOCATION_ARG=${CA_GH_ACTION_CONTAINER_APP_LOCATION_ARG}" >> $GITHUB_ENV
- name: Check if the Container App already exists in the resource group
shell: bash
run: |
az containerapp show \
-g ${{ env.CA_GH_ACTION_RESOURCE_GROUP }} \
-n ${{ inputs.containerAppName }} \
-o none && CA_GH_ACTION_RESOURCE_EXISTS=true || CA_GH_ACTION_RESOURCE_EXISTS=false
echo "CA_GH_ACTION_RESOURCE_EXISTS=${CA_GH_ACTION_RESOURCE_EXISTS}" >> $GITHUB_ENV
- name: Export environment to environment variable
if: ${{ inputs.containerAppEnvironment != '' && env.CA_GH_ACTION_YAML_PROVIDED != 'true' }}
shell: bash
run: |
CA_GH_ACTION_CONTAINER_APP_ENVIRONMENT="${{ inputs.containerAppEnvironment }}"
echo "CA_GH_ACTION_CONTAINER_APP_ENVIRONMENT=${CA_GH_ACTION_CONTAINER_APP_ENVIRONMENT}" >> $GITHUB_ENV
- name: Determine environment name if not provided
if: ${{ inputs.containerAppEnvironment == '' && env.CA_GH_ACTION_YAML_PROVIDED != 'true' }}
shell: bash
run: |
CA_GH_ACTION_CONTAINER_APP_ENVIRONMENT="${{ inputs.containerAppName }}-env"
echo "CA_GH_ACTION_CONTAINER_APP_ENVIRONMENT=${CA_GH_ACTION_CONTAINER_APP_ENVIRONMENT}" >> $GITHUB_ENV
- name: Check if Container App environment already exists with the provided/determined name
if: ${{ env.CA_GH_ACTION_RESOURCE_EXISTS == 'false' && env.CA_GH_ACTION_YAML_PROVIDED != 'true' }}
shell: bash
run: |
az containerapp env show \
-g ${{ env.CA_GH_ACTION_RESOURCE_GROUP }} \
-n ${{ env.CA_GH_ACTION_CONTAINER_APP_ENVIRONMENT }} \
-o none && CA_GH_ACTION_ENVIRONMENT_EXISTS=true || CA_GH_ACTION_ENVIRONMENT_EXISTS=false
echo "CA_GH_ACTION_ENVIRONMENT_EXISTS=${CA_GH_ACTION_ENVIRONMENT_EXISTS}" >> $GITHUB_ENV
- name: Reuse an existing Container App environment if found in the resource group
if: ${{ env.CA_GH_ACTION_ENVIRONMENT_EXISTS == 'false' && inputs.containerAppEnvironment == '' && env.CA_CH_ACTION_YAML_PROVIDED != 'true' }}
shell: bash
run: |
CA_GH_ACTION_TEMP_ENV_NAME=$(az containerapp env list -g ${{ env.CA_GH_ACTION_RESOURCE_GROUP }} --query '[0].name')
if [[ $CA_GH_ACTION_TEMP_ENV_NAME != '' ]]; then \
echo "CA_GH_ACTION_CONTAINER_APP_ENVIRONMENT=${CA_GH_ACTION_TEMP_ENV_NAME}" >> $GITHUB_ENV; \
echo "CA_GH_ACTION_ENVIRONMENT_EXISTS=true" >> $GITHUB_ENV; \
fi
- name: Create Container App environment if the Container App environment doesn't exist
if: ${{ env.CA_GH_ACTION_ENVIRONMENT_EXISTS == 'false' }}
shell: bash
run: |
az containerapp env create \
-g ${{ env.CA_GH_ACTION_RESOURCE_GROUP }} \
-n ${{ env.CA_GH_ACTION_CONTAINER_APP_ENVIRONMENT }} \
${{ env.CA_GH_ACTION_CONTAINER_APP_LOCATION_ARG }}
- name: Export disabled ingress value to environment variable
if: ${{ inputs.ingress == 'disabled' && env.CA_GH_ACTION_YAML_PROVIDED != 'true' }}
shell: bash
run: |
CA_GH_ACTION_INGRESS_ENABLED="false"
echo "CA_GH_ACTION_INGRESS_ENABLED=${CA_GH_ACTION_INGRESS_ENABLED}" >> $GITHUB_ENV
- name: Set default value of ingress to 'external' if not provided
if: ${{ inputs.ingress == '' && env.CA_GH_ACTION_YAML_PROVIDED != 'true' }}
shell: bash
run: |
CA_GH_ACTION_INGRESS_ENABLED="true"
echo "CA_GH_ACTION_INGRESS_ENABLED=${CA_GH_ACTION_INGRESS_ENABLED}" >> $GITHUB_ENV
CA_GH_ACTION_INGRESS_ARG="--ingress external"
echo "CA_GH_ACTION_INGRESS_ARG=${CA_GH_ACTION_INGRESS_ARG}" >> $GITHUB_ENV
- name: Export ingress value to environment variable
if: ${{ inputs.ingress != '' && inputs.ingress != 'disabled' && env.CA_GH_ACTION_YAML_PROVIDED != 'true' }}
shell: bash
run: |
CA_GH_ACTION_INGRESS_ENABLED="true"
echo "CA_GH_ACTION_INGRESS_ENABLED=${CA_GH_ACTION_INGRESS_ENABLED}" >> $GITHUB_ENV
CA_GH_ACTION_INGRESS_ARG="--ingress ${{ inputs.ingress }}"
echo "CA_GH_ACTION_INGRESS_ARG=${CA_GH_ACTION_INGRESS_ARG}" >> $GITHUB_ENV
- name: Export target port to environment variable
if: ${{ env.CA_GH_ACTION_INGRESS_ENABLED == 'true' && inputs.targetPort != '' && env.CA_GH_ACTION_YAML_PROVIDED != 'true' }}
shell: bash
run: |
CA_GH_ACTION_TARGET_PORT="${{ inputs.targetPort }}"
echo "CA_GH_ACTION_TARGET_PORT=${CA_GH_ACTION_TARGET_PORT}" >> $GITHUB_ENV
- name: Default to target port 80 if one wasn't provided and no Dockerfile provided/found with the application source
if: ${{ env.CA_GH_ACTION_INGRESS_ENABLED == 'true' && inputs.targetPort == '' && env.CA_GH_ACTION_DOCKERFILE_PATH == '' && inputs.appSourcePath != '' && env.CA_GH_ACTION_YAML_PROVIDED != 'true' }}
shell: bash
run: |
CA_GH_ACTION_TARGET_PORT="80"
echo "CA_GH_ACTION_TARGET_PORT=${CA_GH_ACTION_TARGET_PORT}" >> $GITHUB_ENV
- name: Default to target port 80 if one wasn't provided or found, and ingress is enabled, and the Container App doesn't exist (prevent overriding)
if: ${{ env.CA_GH_ACTION_INGRESS_ENABLED == 'true' && env.CA_GH_ACTION_RESOURCE_EXISTS == 'false' && env.CA_GH_ACTION_TARGET_PORT == '' && env.CA_GH_ACTION_YAML_PROVIDED != 'true' }}
shell: bash
run: |
CA_GH_ACTION_TARGET_PORT="80"
echo "CA_GH_ACTION_TARGET_PORT=${CA_GH_ACTION_TARGET_PORT}" >> $GITHUB_ENV
- name: Export target port information to environment variable for Azure CLI command
if: ${{ env.CA_GH_ACTION_INGRESS_ENABLED == 'true' && env.CA_GH_ACTION_TARGET_PORT != '' && env.CA_GH_ACTION_YAML_PROVIDED != 'true' }}
shell: bash
run: |
CA_GH_ACTION_TARGET_PORT_ARG="--target-port ${{ env.CA_GH_ACTION_TARGET_PORT }}"
echo "CA_GH_ACTION_TARGET_PORT_ARG=${CA_GH_ACTION_TARGET_PORT_ARG}" >> $GITHUB_ENV
- name: Export environment variables argument to environment variable if the Container App does not exist
if: ${{ inputs.environmentVariables != '' && env.CA_GH_ACTION_RESOURCE_EXISTS == 'false' && env.CA_GH_ACTION_YAML_PROVIDED != 'true' }}
shell: bash
run: |
CA_GH_ACTION_CONTAINER_APP_ENVIRONMENT_VARIABLES_ARG="--env-vars ${{ inputs.environmentVariables }}"
echo "CA_GH_ACTION_CONTAINER_APP_ENVIRONMENT_VARIABLES_ARG=${CA_GH_ACTION_CONTAINER_APP_ENVIRONMENT_VARIABLES_ARG}" >> $GITHUB_ENV
- name: Export environment variables argument to environment variable if the Container App does exist
if: ${{ inputs.environmentVariables != '' && env.CA_GH_ACTION_RESOURCE_EXISTS == 'true' && env.CA_GH_ACTION_YAML_PROVIDED != 'true' }}
shell: bash
run: |
CA_GH_ACTION_CONTAINER_APP_ENVIRONMENT_VARIABLES_ARG="--replace-env-vars ${{ inputs.environmentVariables }}"
echo "CA_GH_ACTION_CONTAINER_APP_ENVIRONMENT_VARIABLES_ARG=${CA_GH_ACTION_CONTAINER_APP_ENVIRONMENT_VARIABLES_ARG}" >> $GITHUB_ENV
- name: Install pack CLI on non-Windows runner
if: ${{ runner.os != 'Windows' && inputs.appSourcePath != '' && env.CA_GH_ACTION_DOCKERFILE_PATH == '' }}
shell: bash
run: (curl -sSL "https://github.com/buildpacks/pack/releases/download/v0.31.0/pack-v0.31.0-${{ runner.os }}.tgz" | sudo tar -C /usr/local/bin/ --no-same-owner -xzv pack)
- name: Install pack CLI on Windows runner
if: ${{ runner.os == 'Windows' && inputs.appSourcePath != '' && env.CA_GH_ACTION_DOCKERFILE_PATH == '' }}
shell: bash
run: |
mkdir -p $PWD/pack && cd $PWD/pack
curl -sSL "https://github.com/buildpacks/pack/releases/download/v0.31.0/pack-v0.31.0-windows.zip" -o "pack-windows.zip"
7z x pack-windows.zip > /dev/null 2>&1
rm pack-windows.zip && echo "$PWD" >> $GITHUB_PATH
- name: Set Oryx++ Builder as default builder
if: ${{ inputs.appSourcePath != '' && env.CA_GH_ACTION_DOCKERFILE_PATH == '' }}
shell: bash
run: pack config default-builder mcr.microsoft.com/oryx/builder:debian-bullseye-20231004.1
- name: Enable experimental features for Oryx++ Builder
if: ${{ inputs.appSourcePath != '' && env.CA_GH_ACTION_DOCKERFILE_PATH == '' }}
shell: bash
run: pack config experimental true
- name: Set telemetry for Oryx++ Builder
if: ${{ inputs.appSourcePath != '' && env.CA_GH_ACTION_DOCKERFILE_PATH == '' && inputs.disableTelemetry == 'false' }}
shell: bash
run: |
CA_GH_ACTION_ORYX_BUILDER_TELEMETRY_ARG='--env "CALLER_ID=github-actions-v1"'
echo "CA_GH_ACTION_ORYX_BUILDER_TELEMETRY_ARG=${CA_GH_ACTION_ORYX_BUILDER_TELEMETRY_ARG}" >> $GITHUB_ENV
- name: Disable telemetry for Oryx++ Builder
if: ${{ inputs.appSourcePath != '' && env.CA_GH_ACTION_DOCKERFILE_PATH == '' && inputs.disableTelemetry == 'true' }}
shell: bash
run: |
CA_GH_ACTION_ORYX_BUILDER_TELEMETRY_ARG='--env "ORYX_DISABLE_TELEMETRY=true"'
echo "CA_GH_ACTION_ORYX_BUILDER_TELEMETRY_ARG=${CA_GH_ACTION_ORYX_BUILDER_TELEMETRY_ARG}" >> $GITHUB_ENV
- name: Parse the given runtime stack input and export the platform and version to environment variables
if: ${{ inputs.appSourcePath != '' && env.CA_GH_ACTION_DOCKERFILE_PATH == '' && inputs.runtimeStack != '' }}
shell: bash
run: |
IFS=':' read -ra CA_GH_ACTION_RUNTIME_STACK <<< "${{ inputs.runtimeStack }}"
CA_GH_ACTION_RUNTIME_STACK_PLATFORM=${CA_GH_ACTION_RUNTIME_STACK[0]}
CA_GH_ACTION_RUNTIME_STACK_VERSION=${CA_GH_ACTION_RUNTIME_STACK[1]}
if [[ CA_GH_ACTION_RUNTIME_STACK_PLATFORM == "dotnetcore" ]]; then CA_GH_ACTION_RUNTIME_STACK_PLATFORM="dotnet"; fi
echo "CA_GH_ACTION_RUNTIME_STACK_PLATFORM=${CA_GH_ACTION_RUNTIME_STACK_PLATFORM}" >> $GITHUB_ENV
echo "CA_GH_ACTION_RUNTIME_STACK_VERSION=${CA_GH_ACTION_RUNTIME_STACK_VERSION}" >> $GITHUB_ENV
- name: Set platform environment variables for builder invocation
if: ${{ inputs.appSourcePath != '' && env.CA_GH_ACTION_DOCKERFILE_PATH == '' && inputs.runtimeStack != '' }}
shell: bash
run: |
CA_GH_ACTION_ORYX_BUILDER_ENV_ARG="--env ORYX_PLATFORM_NAME=${{ env.CA_GH_ACTION_RUNTIME_STACK_PLATFORM }} --env ORYX_PLATFORM_VERSION=${{ env.CA_GH_ACTION_RUNTIME_STACK_VERSION }}"
echo "CA_GH_ACTION_ORYX_BUILDER_ENV_ARG=${CA_GH_ACTION_ORYX_BUILDER_ENV_ARG}" >> $GITHUB_ENV
- name: Set port environment variable for builder invocation
if: ${{ inputs.appSourcePath != '' && env.CA_GH_ACTION_DOCKERFILE_PATH == '' && env.CA_GH_ACTION_TARGET_PORT != '' }}
shell: bash
run: |
CA_GH_ACTION_ORYX_BUILDER_ENV_ARG="${CA_GH_ACTION_ORYX_BUILDER_ENV_ARG} --env ORYX_RUNTIME_PORT=${{ env.CA_GH_ACTION_TARGET_PORT }}"
echo "CA_GH_ACTION_ORYX_BUILDER_ENV_ARG=${CA_GH_ACTION_ORYX_BUILDER_ENV_ARG}" >> $GITHUB_ENV
- name: Create runnable application image using bullseye Oryx++ Builder
if: ${{ inputs.appSourcePath != '' && env.CA_GH_ACTION_DOCKERFILE_PATH == '' && (inputs.builderStack == '' || inputs.builderStack == 'debian-bullseye') }}
shell: bash
run: |
pack build \
${{ env.CA_GH_ACTION_IMAGE_TO_DEPLOY }} \
--path ${{ inputs.appSourcePath }} \
--builder mcr.microsoft.com/oryx/builder:debian-bullseye-20231004.1 \
${{ env.CA_GH_ACTION_ORYX_BUILDER_ENV_ARG }} \
${{ env.CA_GH_ACTION_ORYX_BUILDER_TELEMETRY_ARG }} &&
echo "CA_GH_ACTION_BUILDER_FAILED=false" >> $GITHUB_ENV || \
(echo "CA_GH_ACTION_BUILDER_FAILED=true" >> $GITHUB_ENV && \
echo "CA_GH_ACTION_USE_BOOKWORM_BUILDER=true" >> $GITHUB_ENV)
- name: Create runnable application image using bookworm Oryx++ Builder
if: ${{ inputs.appSourcePath != '' && env.CA_GH_ACTION_DOCKERFILE_PATH == '' && ((inputs.builderStack == '' && env.CA_GH_ACTION_USE_BOOKWORM_BUILDER == 'true') || inputs.builderStack == 'debian-bookworm') }}
shell: bash
run: |
pack build \
${{ env.CA_GH_ACTION_IMAGE_TO_DEPLOY }} \
--path ${{ inputs.appSourcePath }} \
--builder mcr.microsoft.com/oryx/builder:debian-bookworm-20231004.1 \
${{ env.CA_GH_ACTION_ORYX_BUILDER_ENV_ARG }} \
${{ env.CA_GH_ACTION_ORYX_BUILDER_TELEMETRY_ARG }} && \
echo "CA_GH_ACTION_BUILDER_FAILED=false" >> $GITHUB_ENV || \
echo "CA_GH_ACTION_BUILDER_FAILED=true" >> $GITHUB_ENV
- name: Create runnable application image using builder version specified by input
if: ${{ inputs.appSourcePath != '' && env.CA_GH_ACTION_DOCKERFILE_PATH == '' && inputs.builderStack != '' && inputs.builderStack != 'debian-bookworm' && inputs.builderStack != 'debian-bullseye' }}
shell: bash
run: |
pack build \
${{ env.CA_GH_ACTION_IMAGE_TO_DEPLOY }} \
--path ${{ inputs.appSourcePath }} \
--builder mcr.microsoft.com/oryx/builder:${{ inputs.builderStack }} \
${{ env.CA_GH_ACTION_ORYX_BUILDER_ENV_ARG }} \
${{ env.CA_GH_ACTION_ORYX_BUILDER_TELEMETRY_ARG }} && \
echo "CA_GH_ACTION_BUILDER_FAILED=false" >> $GITHUB_ENV || \
echo "CA_GH_ACTION_BUILDER_FAILED=true" >> $GITHUB_ENV
- name: Check if no builder was able to build the provided application source
if: ${{ env.CA_GH_ACTION_BUILDER_FAILED == 'true' }}
shell: bash
run: |
echo "No builder was able to build the provided application source. Please visit the following page for more information on supported platform versions: https://aka.ms/SourceToCloudSupportedVersions"
exit 1
- name: Create runnable application image using provided Dockerfile
if: ${{ inputs.appSourcePath != '' && env.CA_GH_ACTION_DOCKERFILE_PATH != '' }}
shell: bash
run: |
docker build \
--tag ${{ env.CA_GH_ACTION_IMAGE_TO_DEPLOY }} \
--file ${{ env.CA_GH_ACTION_DOCKERFILE_PATH }} \
${{ inputs.appSourcePath }}
- name: Push image to Container Registry
if: ${{ inputs.appSourcePath != '' }}
shell: bash
run: docker push ${{ env.CA_GH_ACTION_IMAGE_TO_DEPLOY }}
- name: Create the Container App from a YAML configuration file
if: ${{ env.CA_GH_ACTION_YAML_PROVIDED == 'true' && env.CA_GH_ACTION_RESOURCE_EXISTS == 'false' }}
shell: bash
run: |
az containerapp create \
-g ${{ env.CA_GH_ACTION_RESOURCE_GROUP }} \
-n ${{ inputs.containerAppName }} \
--yaml ${{ inputs.yamlConfigPath }}
- name: Create the Container App from provided arguments
if: ${{ env.CA_GH_ACTION_YAML_PROVIDED != 'true' && env.CA_GH_ACTION_RESOURCE_EXISTS == 'false' }}
shell: bash
run: |
az containerapp create \
-g ${{ env.CA_GH_ACTION_RESOURCE_GROUP }} \
-n ${{ inputs.containerAppName }} \
-i ${{ env.CA_GH_ACTION_IMAGE_TO_DEPLOY }} \
--environment ${{ env.CA_GH_ACTION_CONTAINER_APP_ENVIRONMENT }} \
${{ env.CA_GH_ACTION_INGRESS_ARG }} \
${{ env.CA_GH_ACTION_TARGET_PORT_ARG }} \
${{ env.CA_GH_ACTION_REGISTRY_LOGIN_ARG }} \
${{ env.CA_GH_ACTION_CONTAINER_APP_ENVIRONMENT_VARIABLES_ARG }}
- name: Update the existing Container App from a YAML configuration file
if: ${{ env.CA_GH_ACTION_YAML_PROVIDED == 'true' && env.CA_GH_ACTION_RESOURCE_EXISTS == 'true' }}
shell: bash
run: |
az containerapp update \
-g ${{ env.CA_GH_ACTION_RESOURCE_GROUP }} \
-n ${{ inputs.containerAppName }} \
--yaml ${{ inputs.yamlConfigPath }}
- name: Determine whether or not 'update' or 'up' should be used
if: ${{ env.CA_GH_ACTION_YAML_PROVIDED != 'true' && env.CA_GH_ACTION_RESOURCE_EXISTS == 'true' && (inputs.targetPort != '' || inputs.ingress != '') }}
shell: bash
run: |
CA_GH_ACTION_USE_UP="true"
echo "CA_GH_ACTION_USE_UP=${CA_GH_ACTION_USE_UP}" >> $GITHUB_ENV
- name: Update the Container Registry details on the existing Container App
if: ${{ env.CA_GH_ACTION_REGISTRY_LOGIN_ARG != '' && env.CA_GH_ACTION_USE_UP != 'true' && env.CA_GH_ACTION_RESOURCE_EXISTS == 'true' && env.CA_GH_ACTION_YAML_PROVIDED != 'true' }}
shell: bash
run: |
az containerapp registry set \
-g ${{ env.CA_GH_ACTION_RESOURCE_GROUP }} \
-n ${{ inputs.containerAppName }} \
--server ${{ env.CA_GH_ACTION_REGISTRY_URL }} \
--username ${{ env.CA_GH_ACTION_REGISTRY_USERNAME }} \
--password ${{ env.CA_GH_ACTION_REGISTRY_PASSWORD }}
- name: Update the existing Container App from provided arguments via 'update' (no ingress values provided)
if: ${{ env.CA_GH_ACTION_USE_UP != 'true' && env.CA_GH_ACTION_YAML_PROVIDED != 'true' && env.CA_GH_ACTION_RESOURCE_EXISTS == 'true' }}
shell: bash
run: |
az containerapp update \
-g ${{ env.CA_GH_ACTION_RESOURCE_GROUP }} \
-n ${{ inputs.containerAppName }} \
-i ${{ env.CA_GH_ACTION_IMAGE_TO_DEPLOY }} \
${{ env.CA_GH_ACTION_CONTAINER_APP_ENVIRONMENT_VARIABLES_ARG }}
- name: Reset the ingress argument environment variable if it wasn't provided (use default ingress value)
if: ${{ inputs.ingress == '' && env.CA_GH_ACTION_YAML_PROVIDED != 'true' && env.CA_GH_ACTION_RESOURCE_EXISTS == 'true' }}
shell: bash
run: |
CA_GH_ACTION_INGRESS_ARG=""
echo "CA_GH_ACTION_INGRESS_ARG=${CA_GH_ACTION_INGRESS_ARG}" >> $GITHUB_ENV
- name: Reset the environment variables argument environment variable for the 'up' command
if: ${{ env.CA_GH_ACTION_USE_UP == 'true' && inputs.environmentVariables != '' }}
shell: bash
run: |
CA_GH_ACTION_CONTAINER_APP_ENVIRONMENT_VARIABLES_ARG="--env-vars ${{ inputs.environmentVariables }}"
echo "CA_GH_ACTION_CONTAINER_APP_ENVIRONMENT_VARIABLES_ARG=${CA_GH_ACTION_CONTAINER_APP_ENVIRONMENT_VARIABLES_ARG}" >> $GITHUB_ENV
- name: Update the existing Container App from provided arguments via 'up' (ingress values provided)
if: ${{ env.CA_GH_ACTION_USE_UP == 'true' }}
shell: bash
run: |
az containerapp up \
-g ${{ env.CA_GH_ACTION_RESOURCE_GROUP }} \
-n ${{ inputs.containerAppName }} \
-i ${{ env.CA_GH_ACTION_IMAGE_TO_DEPLOY }} \
${{ env.CA_GH_ACTION_TARGET_PORT_ARG }} \
${{ env.CA_GH_ACTION_INGRESS_ARG }} \
${{ env.CA_GH_ACTION_CONTAINER_APP_ENVIRONMENT_VARIABLES_ARG }} \
${{ env.CA_GH_ACTION_REGISTRY_LOGIN_ARG }}
- name: Disable ingress on the existing Container App
if: ${{ env.CA_GH_ACTION_RESOURCE_EXISTS == 'true' && inputs.ingress == 'disabled' && env.CA_GH_ACTION_YAML_PROVIDED != 'true' }}
shell: bash
run: |
az containerapp ingress disable \
-g ${{ env.CA_GH_ACTION_RESOURCE_GROUP }} \
-n ${{ inputs.containerAppName }}
- name: Mark action as 'succeeded' for telemetry
if: ${{ inputs.disableTelemetry == 'false' }}
shell: bash
run: |
CA_GH_ACTION_RESULT_ARG="--property 'result=succeeded'"
echo "CA_GH_ACTION_RESULT_ARG=${CA_GH_ACTION_RESULT_ARG}" >> $GITHUB_ENV
- name: End timer that's tracking action execution length, in milliseconds
if: ${{ always() && inputs.disableTelemetry == 'false' }}
shell: bash
run: |
CA_GH_ACTION_END_MILLISECONDS=$(date +%s%N | cut -b1-13)
CA_GH_ACTION_START_MILLISECONDS=${{ env.CA_GH_ACTION_START_MILLISECONDS }}
CA_GH_ACTION_LENGTH_MILLISECONDS_ARG="--processing-time '$((CA_GH_ACTION_END_MILLISECONDS-CA_GH_ACTION_START_MILLISECONDS))'"
echo "CA_GH_ACTION_LENGTH_MILLISECONDS_ARG=${CA_GH_ACTION_LENGTH_MILLISECONDS_ARG}" >> $GITHUB_ENV
- name: Set telemetry for previously built image scenario
if: ${{ inputs.disableTelemetry == 'false' && inputs.appSourcePath == '' }}
shell: bash
run: |
CA_GH_ACTION_SCENARIO_ARG="--property 'scenario=used-image'"
echo "CA_GH_ACTION_SCENARIO_ARG=${CA_GH_ACTION_SCENARIO_ARG}" >> $GITHUB_ENV
- name: Set telemetry for built Dockerfile scenario
if: ${{ inputs.disableTelemetry == 'false' && env.CA_GH_ACTION_DOCKERFILE_PATH != '' }}
shell: bash
run: |
CA_GH_ACTION_SCENARIO_ARG="--property 'scenario=used-dockerfile'"
echo "CA_GH_ACTION_SCENARIO_ARG=${CA_GH_ACTION_SCENARIO_ARG}" >> $GITHUB_ENV
- name: Set telemetry for no Dockerfile scenario
if: ${{ inputs.disableTelemetry == 'false' && inputs.appSourcePath != '' && env.CA_GH_ACTION_DOCKERFILE_PATH == '' }}
shell: bash
run: |
CA_GH_ACTION_SCENARIO_ARG="--property 'scenario=used-builder'"
echo "CA_GH_ACTION_SCENARIO_ARG=${CA_GH_ACTION_SCENARIO_ARG}" >> $GITHUB_ENV
- name: Log telemetry for action
if: ${{ always() && inputs.disableTelemetry == 'false' }}
shell: bash
run: |
docker run \
--rm \
mcr.microsoft.com/oryx/cli:builder-debian-bullseye-20230926.1 \
/bin/bash \
-c "oryx telemetry --event-name 'ContainerAppsGitHubAction' ${{ env.CA_GH_ACTION_LENGTH_MILLISECONDS_ARG }} ${{ env.CA_GH_ACTION_SCENARIO_ARG }} ${{ env.CA_GH_ACTION_RESULT_ARG }}"