From 28f8f08cf6d905ab5129f86028e17fb6fd4657a4 Mon Sep 17 00:00:00 2001 From: Tudor Popa Date: Wed, 30 Oct 2024 17:04:50 +0100 Subject: [PATCH] feat(pipelines): add azure app authentication for pr website blob upload --- .github/workflows/pr-website-deploy.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-website-deploy.yml b/.github/workflows/pr-website-deploy.yml index 5c7c8e9fe5b9c0..79ac980ab94d65 100644 --- a/.github/workflows/pr-website-deploy.yml +++ b/.github/workflows/pr-website-deploy.yml @@ -82,15 +82,23 @@ jobs: name: pr-website-artifacts path: ./pr-deploy-site/ + - name: 'Login via Azure CLI' + uses: azure/login@v2 + with: + client-id: ${{ secrets.AZURE_CLIENT_ID }} + tenant-id: ${{ secrets.AZURE_TENANT_ID }} + subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} + - name: Upload PR WebSite uses: azure/cli@v2 + env: + AZCOPY_AUTO_LOGIN_TYPE: 'AZCLI' with: azcliversion: latest inlineScript: | az storage blob upload-batch \ --destination '$web' \ --source ./pr-deploy-site \ - --subscription ${{ env.AZURE_SUBSCRIPTION }} --account-name ${{ env.AZURE_STORAGE }} \ --destination-path ${{ env.DEPLOY_BASE_PATH }} \ --auth-mode login \