File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed
Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change 2323 steps :
2424 - name : Log in to Azure with service principal
2525 uses : azure/login@v2
26+ if : ${{ vars.AZURE_CLIENT_ID == '' }}
2627 with :
2728 creds : ${{ secrets.AZURE_CREDENTIALS }}
29+ - name : Log in with Azure (Federated Credentials)
30+ if : ${{ vars.AZURE_CLIENT_ID != '' }}
31+ uses : azure/login@v2
32+ with :
33+ client-id : ${{ vars.AZURE_CLIENT_ID }}
34+ tenant-id : ${{ vars.AZURE_TENANT_ID }}
35+ subscription-id : ${{ vars.AZURE_SUBSCRIPTION_ID }}
2836 - name : Build and deploy Container App
2937 uses : azure/container-apps-deploy-action@v1
3038 with :
Original file line number Diff line number Diff line change @@ -17,17 +17,30 @@ jobs:
1717 build :
1818 runs-on : ubuntu-latest
1919 environment : ${{inputs.env-name}}
20+
2021 steps :
2122 - name : Log in to Azure with service principal
23+ if : ${{ vars.AZURE_CLIENT_ID == '' }}
2224 uses : azure/login@v2
2325 with :
2426 creds : ${{ secrets.AZURE_CREDENTIALS }}
2527 - name : Log in Azure Container Registry
28+ if : ${{ vars.AZURE_CLIENT_ID == '' }}
2629 uses : azure/docker-login@v2
2730 with :
2831 login-server : ${{vars.ACR_NAME}}.azurecr.io
2932 username : ${{ secrets.SPI_CLIENT_ID }}
3033 password : ${{ secrets.SPI_CLIENT_SECRET }}
34+ - name : Log in with Azure (Federated Credentials)
35+ if : ${{ vars.AZURE_CLIENT_ID != '' }}
36+ uses : azure/login@v2
37+ with :
38+ client-id : ${{ vars.AZURE_CLIENT_ID }}
39+ tenant-id : ${{ vars.AZURE_TENANT_ID }}
40+ subscription-id : ${{ vars.AZURE_SUBSCRIPTION_ID }}
41+ - name : Login to Azure Container Registry (Federated Credentials)
42+ if : ${{ vars.AZURE_CLIENT_ID != '' }}
43+ run : az acr login --name ${{vars.ACR_NAME}}
3144 - uses : actions/checkout@v2
3245 - name : Build and Push to ACR
3346 run : |
You can’t perform that action at this time.
0 commit comments