-
Notifications
You must be signed in to change notification settings - Fork 0
614 lines (529 loc) · 22.5 KB
/
ci_cd.yml
File metadata and controls
614 lines (529 loc) · 22.5 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
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
name: Build and Deploy Dotnet Core Projects to Azure
on:
push:
branches:
- master
workflow_dispatch:
env:
# Diretórios dos projetos – verifique se os nomes estão corretos!
AZURE_FUNCTIONAPP_CRIAR_AGENDAMEDICO: './MedicalHealth.Fiap.Function.Persistencia.AgendaMedico'
AZURE_FUNCTIONAPP_ATUALIZAR_AGENDAMEDICO: './MedicalHealth.Fiap.Function.Persistencia.Atualizar.AgendaMedico'
AZURE_FUNCTIONAPP_CRIAR_CONSULTA: './MedicalHealth.Fiap.Function.Persistencia.Criar.Consulta'
AZURE_FUNCTIONAPP_ATUALIZAR_CONSULTA: './MedicalHealth.Fiap.Function.Persistencia.Atualizar.Consulta'
AZURE_FUNCTIONAPP_CRIAR_USUARIO: './MedicalHealth.Fiap.Function.Pesistencia.Criar.Usuario'
AZURE_FUNCTIONAPP_ATUALIZAR_USUARIO: './MedicalHealth.Fiap.Function.Pesistencia.Atualizar.Usuario'
AZURE_FUNCTIONAPP_CRIAR_MEDICO: './MedicalHealth.Fiap.Function.Pesistencia.Criar.Medico'
AZURE_FUNCTIONAPP_ATUALIZAR_MEDICO: './MedicalHealth.Fiap.Function.Pesistencia.Atualizar.Medico'
AZURE_FUNCTIONAPP_CRIAR_PACIENTE: './MedicalHealth.Fiap.Function.Pesistencia.Criar.Paciente'
AZURE_FUNCTIONAPP_ATUALIZAR_PACIENTE: './MedicalHealth.Fiap.Function.Pesistencia.Atualizar.Paciente'
DOTNET_VERSION: '8.0.x'
DOTNET_ROOT: /home/runner/.dotnet
################################################################################
# JOB DA API
################################################################################
jobs:
build-api:
runs-on: ubuntu-latest
steps:
- name: Checkout do Código
uses: actions/checkout@v4
- name: Configurar .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Build e Publish da API
run: |
dotnet publish MedicalHealth.Fiap.API -c Release -o ./output/api
- name: Upload do Artefato da API
uses: actions/upload-artifact@v4
with:
name: api-artifact
path: ./output/api
deploy-api:
runs-on: ubuntu-latest
needs: build-api
steps:
- name: Download do Artefato da API
uses: actions/download-artifact@v4
with:
name: api-artifact
path: ./output/api
- name: Login no Azure
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Configurar Storage da API
run: |
az webapp config appsettings set --resource-group "Hackathon" --name "hackathonapigrupo12" \
--settings AZURE_WEBJOBS_STORAGE=${{ secrets.AZURE_WEBJOBS_STORAGE }}
- name: Deploy da API
uses: azure/webapps-deploy@v2
with:
app-name: hackathonapigrupo12
slot-name: Production
package: ./output/api
- name: Logout do Azure
run: az logout
################################################################################
# FUNCTION: CRIAR AGENDAMENTO
################################################################################
build-function-criar-agendamento:
runs-on: ubuntu-latest
steps:
- name: Checkout do Código
uses: actions/checkout@v4
- name: Configurar .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Build FUNCTION_CRIAR_AGENDAMEDICO
run: |
pushd "${{ env.AZURE_FUNCTIONAPP_CRIAR_AGENDAMEDICO }}"
dotnet restore
dotnet publish --configuration Release --output ./output/criaragendamedico
popd
- name: Upload Artefato FUNCTION_CRIAR_AGENDAMEDICO
uses: actions/upload-artifact@v4
with:
name: criaragendamedico-artifact
path: "${{ env.AZURE_FUNCTIONAPP_CRIAR_AGENDAMEDICO }}/output/criaragendamedico"
deploy-function-criar-agendamento:
runs-on: ubuntu-latest
needs: build-function-criar-agendamento
steps:
- name: Login no Azure
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Download Artefato FUNCTION_CRIAR_AGENDAMEDICO
uses: actions/download-artifact@v4
with:
name: criaragendamedico-artifact
path: "./MedicalHealth.Fiap.Function.Persistencia.AgendaMedico/output/criaragendamedico"
- name: Deploy FUNCTION_CRIAR_AGENDAMEDICO
uses: Azure/functions-action@v1
with:
app-name: FunctionPersistenciaCriarAgendaMedico
slot-name: Production
package: "./MedicalHealth.Fiap.Function.Persistencia.AgendaMedico/output/criaragendamedico"
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_38DD225916C44C9EB6239E4C35905D96 }}
- name: Logout do Azure
run: az logout
################################################################################
# FUNCTION: ATUALIZAR AGENDAMENTO
################################################################################
build-function-atualizar-agendamento:
runs-on: ubuntu-latest
steps:
- name: Checkout do Código
uses: actions/checkout@v4
- name: Configurar .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Build FUNCTION_ATUALIZAR_AGENDAMEDICO
run: |
pushd "${{ env.AZURE_FUNCTIONAPP_ATUALIZAR_AGENDAMEDICO }}"
dotnet restore
dotnet publish --configuration Release --output ./output/atualizaragendamedico
popd
- name: Upload Artefato FUNCTION_ATUALIZAR_AGENDAMEDICO
uses: actions/upload-artifact@v4
with:
name: atualizaragendamedico-artifact
path: "${{ env.AZURE_FUNCTIONAPP_ATUALIZAR_AGENDAMEDICO }}/output/atualizaragendamedico"
deploy-function-atualizar-agendamento:
runs-on: ubuntu-latest
needs: build-function-atualizar-agendamento
steps:
- name: Login no Azure
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Download Artefato FUNCTION_ATUALIZAR_AGENDAMEDICO
uses: actions/download-artifact@v4
with:
name: atualizaragendamedico-artifact
path: "./MedicalHealth.Fiap.Function.Persistencia.Atualizar.AgendaMedico/output/atualizaragendamedico"
- name: Deploy FUNCTION_ATUALIZAR_AGENDAMEDICO
uses: Azure/functions-action@v1
with:
app-name: FunctionPersistenciaAtualizarAgendaMedico
slot-name: Production
package: "./MedicalHealth.Fiap.Function.Persistencia.Atualizar.AgendaMedico/output/atualizaragendamedico"
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_399629F90EF5456692CF3972F1AE7ECD }}
- name: Logout do Azure
run: az logout
################################################################################
# FUNCTION: CRIAR CONSULTA
################################################################################
build-function-criar-consulta:
runs-on: ubuntu-latest
steps:
- name: Checkout do Código
uses: actions/checkout@v4
- name: Configurar .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Build FUNCTION_CRIAR_CONSULTA
run: |
pushd "${{ env.AZURE_FUNCTIONAPP_CRIAR_CONSULTA }}"
dotnet restore
dotnet publish --configuration Release --output ./output/criarconsulta
popd
- name: Upload Artefato FUNCTION_CRIAR_CONSULTA
uses: actions/upload-artifact@v4
with:
name: criarconsulta-artifact
path: "${{ env.AZURE_FUNCTIONAPP_CRIAR_CONSULTA }}/output/criarconsulta"
deploy-function-criar-consulta:
runs-on: ubuntu-latest
needs: build-function-criar-consulta
steps:
- name: Login no Azure
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Download Artefato FUNCTION_CRIAR_CONSULTA
uses: actions/download-artifact@v4
with:
name: criarconsulta-artifact
path: "./MedicalHealth.Fiap.Function.Persistencia.Criar.Consulta/output/criarconsulta"
- name: Deploy FUNCTION_CRIAR_CONSULTA
uses: Azure/functions-action@v1
with:
app-name: FunctionPersistenciaCriarConsulta
slot-name: Production
package: "./MedicalHealth.Fiap.Function.Persistencia.Criar.Consulta/output/criarconsulta"
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_A896A7CF00A04A1E9927857B3A8FAE7E }}
- name: Logout do Azure
run: az logout
################################################################################
# FUNCTION: ATUALIZAR CONSULTA NÃO CRIADO FUNCTION NO AZURE E DEPLOY DEVIDO LIMITAÇÕES DE PLANO E DINHEIRO
################################################################################
build-function-atualizar-consulta:
runs-on: ubuntu-latest
steps:
- name: Checkout do Código
uses: actions/checkout@v4
- name: Configurar .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Build FUNCTION_ATUALIZAR_CONSULTA
run: |
pushd "${{ env.AZURE_FUNCTIONAPP_ATUALIZAR_CONSULTA }}"
dotnet restore
dotnet publish --configuration Release --output ./output/atualizarconsulta
popd
- name: Upload Artefato FUNCTION_ATUALIZAR_CONSULTA
uses: actions/upload-artifact@v4
with:
name: atualizarconsulta-artifact
path: "${{ env.AZURE_FUNCTIONAPP_ATUALIZAR_CONSULTA }}/output/atualizarconsulta"
# deploy-function-atualizar-consulta:
# runs-on: ubuntu-latest
# needs: build-function-atualizar-consulta
# steps:
# - name: Login no Azure
# uses: azure/login@v1
# with:
# creds: ${{ secrets.AZURE_CREDENTIALS }}
#
# - name: Remover WEBSITE_RUN_FROM_PACKAGE
# run: |
# az webapp config appsettings delete \
# --resource-group "HackathonFunction" \
# --name FunctionPersistenciaAtualizarConsulta \
# --setting-names WEBSITE_RUN_FROM_PACKAGE
#
# - name: Download Artefato FUNCTION_ATUALIZAR_CONSULTA
# uses: actions/download-artifact@v4
# with:
# name: atualizarconsulta-artifact
# path: "./MedicalHealth.Fiap.Function.Persistencia.Atualizar.Consulta/output/atualizarconsulta"
#
# - name: Deploy FUNCTION_ATUALIZAR_CONSULTA
# uses: Azure/functions-action@v1
# with:
# app-name: FunctionPersistenciaAtualizarConsulta
# slot-name: Production
# package: "./MedicalHealth.Fiap.Function.Persistencia.Atualizar.Consulta/output/atualizarconsulta"
# publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_272C1F31E9C84716B19BB7BA813E23F7 }}
#
# - name: Logout do Azure
# run: az logout
################################################################################
# FUNCTION: CRIAR USUÁRIO
################################################################################
build-function-criar-usuario:
runs-on: ubuntu-latest
steps:
- name: Checkout do Código
uses: actions/checkout@v4
- name: Configurar .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Build FUNCTION_CRIAR_USUARIO
run: |
pushd "${{ env.AZURE_FUNCTIONAPP_CRIAR_USUARIO }}"
dotnet restore
dotnet publish --configuration Release --output ./output/criarusuario
popd
- name: Upload Artefato FUNCTION_CRIAR_USUARIO
uses: actions/upload-artifact@v4
with:
name: criarusuario-artifact
path: "${{ env.AZURE_FUNCTIONAPP_CRIAR_USUARIO }}/output/criarusuario"
deploy-function-criar-usuario:
runs-on: ubuntu-latest
needs: build-function-criar-usuario
steps:
- name: Login no Azure
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Download Artefato FUNCTION_CRIAR_USUARIO
uses: actions/download-artifact@v4
with:
name: criarusuario-artifact
path: "./MedicalHealth.Fiap.Function.Pesistencia.Criar.Usuario/output/criarusuario"
- name: Deploy FUNCTION_CRIAR_USUARIO
uses: Azure/functions-action@v1
with:
app-name: FunctionPersistenciaCriarUsuario
slot-name: Production
package: "./MedicalHealth.Fiap.Function.Pesistencia.Criar.Usuario/output/criarusuario"
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_6EFBA21EBAC946D68E226057B7B25234 }}
- name: Logout do Azure
run: az logout
################################################################################
# FUNCTION: ATUALIZAR USUÁRIO
################################################################################
build-function-atualizar-usuario:
runs-on: ubuntu-latest
steps:
- name: Checkout do Código
uses: actions/checkout@v4
- name: Configurar .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Build FUNCTION_ATUALIZAR_USUARIO
run: |
pushd "${{ env.AZURE_FUNCTIONAPP_ATUALIZAR_USUARIO }}"
dotnet restore
dotnet publish --configuration Release --output ./output/atualizarusuario
popd
- name: Upload Artefato FUNCTION_ATUALIZAR_USUARIO
uses: actions/upload-artifact@v4
with:
name: atualizarusuario-artifact
path: "${{ env.AZURE_FUNCTIONAPP_ATUALIZAR_USUARIO }}/output/atualizarusuario"
deploy-function-atualizar-usuario:
runs-on: ubuntu-latest
needs: build-function-atualizar-usuario
steps:
- name: Login no Azure
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Download Artefato FUNCTION_ATUALIZAR_USUARIO
uses: actions/download-artifact@v4
with:
name: atualizarusuario-artifact
path: "./MedicalHealth.Fiap.Function.Pesistencia.Atualizar.Usuario/output/atualizarusuario"
- name: Deploy FUNCTION_ATUALIZAR_USUARIO
uses: Azure/functions-action@v1
with:
app-name: FunctionPersistenciaAtualizarUsuario
slot-name: Production
package: "./MedicalHealth.Fiap.Function.Pesistencia.Atualizar.Usuario/output/atualizarusuario"
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_60A79874E145407A8E97BFCA08FFD84F }}
- name: Logout do Azure
run: az logout
################################################################################
# FUNCTION: CRIAR MÉDICO NÃO CRIADO FUNCTION NO AZURE E DEPLOY DEVIDO LIMITAÇÕES DE PLANO E DINHEIRO
################################################################################
build-function-criar-medico:
runs-on: ubuntu-latest
steps:
- name: Checkout do Código
uses: actions/checkout@v4
- name: Configurar .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Build FUNCTION_CRIAR_MEDICO
run: |
pushd "${{ env.AZURE_FUNCTIONAPP_CRIAR_MEDICO }}"
dotnet restore
dotnet publish --configuration Release --output ./output/criarmedico
popd
- name: Upload Artefato FUNCTION_CRIAR_MEDICO
uses: actions/upload-artifact@v4
with:
name: criarmedico-artifact
path: "${{ env.AZURE_FUNCTIONAPP_CRIAR_MEDICO }}/output/criarmedico"
#deploy-function-criar-medico:
# runs-on: ubuntu-latest
# needs: build-function-criar-medico
# steps:
# - name: Login no Azure
# uses: azure/login@v1
# with:
# creds: ${{ secrets.AZURE_CREDENTIALS }}
# - name: Download Artefato FUNCTION_CRIAR_MEDICO
# uses: actions/download-artifact@v4
# with:
# name: criarmedico-artifact
# path: "./MedicalHealth.Fiap.Function.Pesistencia.Criar.Medico/output/criarmedico"
# - name: Deploy FUNCTION_CRIAR_MEDICO
# uses: Azure/functions-action@v1
# with:
# app-name: FunctionPersistenciaCriarMedico
# slot-name: Production
# package: "./MedicalHealth.Fiap.Function.Pesistencia.Criar.Medico/output/criarmedico"
# publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_CRIAR_MEDICO }}
# - name: Logout do Azure
# run: az logout
################################################################################
# FUNCTION: ATUALIZAR MÉDICO NÃO CRIADO FUNCTION NO AZURE E DEPLOY DEVIDO LIMITAÇÕES DE PLANO E DINHEIRO
################################################################################
build-function-atualizar-medico:
runs-on: ubuntu-latest
steps:
- name: Checkout do Código
uses: actions/checkout@v4
- name: Configurar .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Build FUNCTION_ATUALIZAR_MEDICO
run: |
pushd "${{ env.AZURE_FUNCTIONAPP_ATUALIZAR_MEDICO }}"
dotnet restore
dotnet publish --configuration Release --output ./output/atualizarmedico
popd
- name: Upload Artefato FUNCTION_ATUALIZAR_MEDICO
uses: actions/upload-artifact@v4
with:
name: atualizarmedico-artifact
path: "${{ env.AZURE_FUNCTIONAPP_ATUALIZAR_MEDICO }}/output/atualizarmedico"
# deploy-function-atualizar-medico:
# runs-on: ubuntu-latest
# needs: build-function-atualizar-medico
# steps:
# - name: Login no Azure
# uses: azure/login@v1
# with:
# creds: ${{ secrets.AZURE_CREDENTIALS }}
#
# - name: Download Artefato FUNCTION_ATUALIZAR_MEDICO
# uses: actions/download-artifact@v4
# with:
# name: atualizarmedico-artifact
# path: "./MedicalHealth.Fiap.Function.Pesistencia.Atualizar.Medico/output/atualizarmedico"
#
# - name: Deploy FUNCTION_ATUALIZAR_MEDICO
# uses: Azure/functions-action@v1
# with:
# app-name: FunctionPersistenciaAtualizarMedico
# slot-name: Production
# package: "./MedicalHealth.Fiap.Function.Pesistencia.Atualizar.Medico/output/atualizarmedico"
# publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_ATUALIZAR_MEDICO }}
#
# - name: Logout do Azure
# run: az logout
################################################################################
# FUNCTION: CRIAR PACIENTE
################################################################################
build-function-criar-paciente:
runs-on: ubuntu-latest
steps:
- name: Checkout do Código
uses: actions/checkout@v4
- name: Configurar .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Build FUNCTION_CRIAR_PACIENTE
run: |
pushd "${{ env.AZURE_FUNCTIONAPP_CRIAR_PACIENTE }}"
dotnet restore
dotnet publish --configuration Release --output ./output/criarpaciente
popd
- name: Upload Artefato FUNCTION_CRIAR_PACIENTE
uses: actions/upload-artifact@v4
with:
name: criarpaciente-artifact
path: "${{ env.AZURE_FUNCTIONAPP_CRIAR_PACIENTE }}/output/criarpaciente"
deploy-function-criar-paciente:
runs-on: ubuntu-latest
needs: build-function-criar-paciente
steps:
- name: Login no Azure
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Download Artefato FUNCTION_CRIAR_PACIENTE
uses: actions/download-artifact@v4
with:
name: criarpaciente-artifact
path: "./MedicalHealth.Fiap.Function.Pesistencia.Criar.Paciente/output/criarpaciente"
- name: Deploy FUNCTION_CRIAR_PACIENTE
uses: Azure/functions-action@v1
with:
app-name: FunctionPersistenciaCriarPaciente
slot-name: Production
package: "./MedicalHealth.Fiap.Function.Pesistencia.Criar.Paciente/output/criarpaciente"
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_CRIAR_PACIENTE }}
- name: Logout do Azure
run: az logout
################################################################################
# FUNCTION: ATUALIZAR PACIENTE
################################################################################
build-function-atualizar-paciente:
runs-on: ubuntu-latest
steps:
- name: Checkout do Código
uses: actions/checkout@v4
- name: Configurar .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Build FUNCTION_ATUALIZAR_PACIENTE
run: |
pushd "${{ env.AZURE_FUNCTIONAPP_ATUALIZAR_PACIENTE }}"
dotnet restore
dotnet publish --configuration Release --output ./output/atualizarpaciente
popd
- name: Upload Artefato FUNCTION_ATUALIZAR_PACIENTE
uses: actions/upload-artifact@v4
with:
name: atualizarpaciente-artifact
path: "${{ env.AZURE_FUNCTIONAPP_ATUALIZAR_PACIENTE }}/output/atualizarpaciente"
deploy-function-atualizar-paciente:
runs-on: ubuntu-latest
needs: build-function-atualizar-paciente
steps:
- name: Login no Azure
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Download Artefato FUNCTION_ATUALIZAR_PACIENTE
uses: actions/download-artifact@v4
with:
name: atualizarpaciente-artifact
path: "./MedicalHealth.Fiap.Function.Pesistencia.Atualizar.Paciente/output/atualizarpaciente"
- name: Deploy FUNCTION_ATUALIZAR_PACIENTE
uses: Azure/functions-action@v1
with:
app-name: FunctionPersistenciaAtualizarPaciente
slot-name: Production
package: "./MedicalHealth.Fiap.Function.Pesistencia.Atualizar.Paciente/output/atualizarpaciente"
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_ATUALIZAR_PACIENTE }}
- name: Logout do Azure
run: az logout