From 86ecd9e4ad581951777a907b079d6f717f149c3d Mon Sep 17 00:00:00 2001 From: Shiying Chen Date: Mon, 24 Feb 2025 11:14:05 +0800 Subject: [PATCH] Create azure-login-mi-test.yml --- .github/workflows/azure-login-mi-test.yml | 33 +++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/azure-login-mi-test.yml diff --git a/.github/workflows/azure-login-mi-test.yml b/.github/workflows/azure-login-mi-test.yml new file mode 100644 index 000000000..95b41a87c --- /dev/null +++ b/.github/workflows/azure-login-mi-test.yml @@ -0,0 +1,33 @@ +name: Azure Login Action Test User-MI +on: + workflow_dispatch: + push: + +permissions: + id-token: write + +jobs: + TestforAzclilatest: + runs-on: self-hosted + container: ubuntu:22.04 + steps: + - name: Install Azure CLI + run: | + apt-get update + apt-get install -y curl + curl -sL https://aka.ms/InstallAzureCLIDeb | bash + + - name: Check Azure CLI Version + run: | + az --version + + - name: Login with tenant-level user-assigned managed identity with allow-no-subscriptions + uses: azure/login@sy/mi-clientid + with: + client-id: ${{ secrets.UMI_TEMP_CLIENT_ID }} + subscription-id: ${{ secrets.UMI_TEMP_SUBSCRIPTIONID }} + auth-type: IDENTITY + + - name: Run Azure Cli again + run: | + az group list --output none