Skip to content

Commit 86ecd9e

Browse files
authored
Create azure-login-mi-test.yml
1 parent 888619b commit 86ecd9e

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Azure Login Action Test User-MI
2+
on:
3+
workflow_dispatch:
4+
push:
5+
6+
permissions:
7+
id-token: write
8+
9+
jobs:
10+
TestforAzclilatest:
11+
runs-on: self-hosted
12+
container: ubuntu:22.04
13+
steps:
14+
- name: Install Azure CLI
15+
run: |
16+
apt-get update
17+
apt-get install -y curl
18+
curl -sL https://aka.ms/InstallAzureCLIDeb | bash
19+
20+
- name: Check Azure CLI Version
21+
run: |
22+
az --version
23+
24+
- name: Login with tenant-level user-assigned managed identity with allow-no-subscriptions
25+
uses: azure/login@sy/mi-clientid
26+
with:
27+
client-id: ${{ secrets.UMI_TEMP_CLIENT_ID }}
28+
subscription-id: ${{ secrets.UMI_TEMP_SUBSCRIPTIONID }}
29+
auth-type: IDENTITY
30+
31+
- name: Run Azure Cli again
32+
run: |
33+
az group list --output none

0 commit comments

Comments
 (0)