From a8e6115e1fd9dc6304c2093dec8886ce27fd48f2 Mon Sep 17 00:00:00 2001 From: Zi Chen Date: Fri, 10 Mar 2023 10:51:18 -0800 Subject: [PATCH 1/3] Don't use AZURE_CREDENTIALS --- .github/workflows/pr-check.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 11c7975c..acd2217d 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -45,7 +45,9 @@ jobs: - name: Azure Login uses: azure/login@v1 with: - creds: ${{ secrets.AZURE_CREDENTIALS }} + client-id: ${{ secrets.CLIENT_ID }} + tenant-id: ${{ secrets.TENANT_ID }} + subscription-id: ${{ secrets.SUBSCRIPTION_ID }} # Deploy a DACPAC with only a table to server - name: Test DACPAC Action From c8886c477204d36d25a6934d0256a94499dfe02e Mon Sep 17 00:00:00 2001 From: Zi Chen Date: Fri, 10 Mar 2023 10:57:11 -0800 Subject: [PATCH 2/3] Add workflow permissions --- .github/workflows/pr-check.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index acd2217d..9e71336e 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -9,6 +9,9 @@ on: paths: - '.github/workflows/pr-check.yml' +permissions: + id-token: write # This is needed for Azure login with OIDC + jobs: deploy: environment: Automation test # this environment requires approval before running the action From ad4d65bcb6c47614b39e783ab234241b8bdf8e21 Mon Sep 17 00:00:00 2001 From: Zi Chen Date: Fri, 10 Mar 2023 11:10:25 -0800 Subject: [PATCH 3/3] Fix secrets names --- .github/workflows/pr-check.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 9e71336e..c0dd78db 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -48,9 +48,9 @@ jobs: - name: Azure Login uses: azure/login@v1 with: - client-id: ${{ secrets.CLIENT_ID }} - tenant-id: ${{ secrets.TENANT_ID }} - subscription-id: ${{ secrets.SUBSCRIPTION_ID }} + client-id: ${{ secrets.AZURE_CLIENT_ID }} + tenant-id: ${{ secrets.AZURE_TENANT_ID }} + subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} # Deploy a DACPAC with only a table to server - name: Test DACPAC Action