77 default : " Test"
88 type : string
99 secrets :
10+ AZURE_SUBSCRIPTION_ID :
11+ required : true
1012 AZURE_CREDENTIALS :
1113 required : true
1214 AZURE_STATIC_WEB_APPS_API_TOKEN :
2123env :
2224 AZURE_WEBAPP_PACKAGE_PATH : PocketDDD.Server.WebAPI/publish
2325 CONFIGURATION : Release
24- DOTNET_CORE_VERSION : 8 .0.x
26+ DOTNET_CORE_VERSION : 10 .0.x
2527 WORKING_DIRECTORY : PocketDDD.Server/PocketDDD.Server.WebAPI
2628
29+ permissions :
30+ contents : read
31+ id-token : write
32+
2733jobs :
2834 deploy_terraform :
2935 runs-on : ubuntu-latest
@@ -36,16 +42,17 @@ jobs:
3642 steps :
3743 - uses : actions/checkout@v4
3844 - name : Log in with Azure
39- uses : azure/login@v1
45+ uses : azure/login@v2
4046 with :
4147 creds : ' ${{ secrets.AZURE_CREDENTIALS }}'
4248 - name : Setup terraform
43- uses : hashicorp/setup-terraform@v3
49+ uses : hashicorp/setup-terraform@v4
4450 - run : |
4551 terraform init -backend-config="key=${{ inputs.env }}.terraform.tfstate"
4652
4753 terraform apply -auto-approve -var-file ../tfvars/${{ inputs.env }}.tfvars -var 'cloudflare_account_id=${{ secrets.CLOUDFLARE_ACCOUNT_ID }}'
4854 env:
55+ ARM_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
4956 ARM_ACCESS_KEY: ${{ secrets.TERRAFORM_STATE_ACCESS_KEY }}
5057 CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }}
5158
7986 needs : [deploy_terraform, build_api_server]
8087 steps :
8188 - name : Log in with Azure
82- uses : azure/login@v1
89+ uses : azure/login@v2
8390 with :
8491 creds : ' ${{ secrets.AZURE_CREDENTIALS }}'
8592 - name : Download artifact from build job
8895 name : webapp
8996 path : ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}
9097 - name : Deploy to Azure WebApp
91- uses : azure/webapps-deploy@v2
98+ uses : azure/webapps-deploy@v3
9299 with :
93100 app-name : pocketddd-${{ inputs.env }}-api-server-web-app
94101 package : ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}
@@ -99,11 +106,11 @@ jobs:
99106 name : Build and Deploy Blazor Client
100107 needs : deploy_terraform
101108 steps :
102- - uses : actions/checkout@v2
109+ - uses : actions/checkout@v4
103110 with :
104111 submodules : true
105112 - name : Log in with Azure
106- uses : azure/login@v1
113+ uses : azure/login@v2
107114 with :
108115 creds : ' ${{ secrets.AZURE_CREDENTIALS }}'
109116
0 commit comments