Skip to content

Commit 124cb8f

Browse files
committed
Merge branch 'main' of github.com:DevExpGbb/agentic-platform-engineering
2 parents 5243f97 + 170ae5e commit 124cb8f

1 file changed

Lines changed: 50 additions & 0 deletions

File tree

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: "Copilot - Azure Login"
2+
3+
# Automatically run the setup steps when they are changed to allow for easy validation, and
4+
# allow manual testing through the repository's "Actions" tab
5+
on:
6+
workflow_dispatch:
7+
8+
permissions:
9+
id-token: write
10+
contents: read
11+
issues: write
12+
13+
env:
14+
ARM_CLIENT_ID: ${{ secrets.ARM_CLIENT_ID }}
15+
ARM_SUBSCRIPTION_ID: ${{ secrets.ARM_SUBSCRIPTION_ID }}
16+
ARM_TENANT_ID: ${{ secrets.ARM_TENANT_ID }}
17+
ARM_USE_OIDC: true
18+
19+
jobs:
20+
# The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
21+
copilot-setup-steps:
22+
runs-on: ubuntu-latest
23+
environment: demo
24+
25+
# Set the permissions to the lowest permissions possible needed for your steps.
26+
# Copilot will be given its own token for its operations.
27+
permissions:
28+
# If you want to clone the repository as part of your setup steps, for example to install dependencies, you'll need the `contents: read` permission. If you don't clone the repository in your setup steps, Copilot will do this for you automatically after the steps complete.
29+
contents: write
30+
31+
# You can define any steps you want, and they will run before the agent starts.
32+
# If you do not check out your code, Copilot will do this for you.
33+
steps:
34+
- name: Checkout code
35+
uses: actions/checkout@v5
36+
37+
# Setup Azure Federated Identity Credentials
38+
- name: Azure CLI Login
39+
uses: azure/login@v2
40+
with:
41+
client-id: ${{ secrets.ARM_CLIENT_ID }}
42+
tenant-id: ${{ secrets.ARM_TENANT_ID }}
43+
subscription-id: ${{ secrets.ARM_SUBSCRIPTION_ID }}
44+
- name: 'Validate Workload Identity Auth Works'
45+
uses: azure/login@v2
46+
with:
47+
azcliversion: latest
48+
inlineScript: |
49+
az account show
50+
az group list

0 commit comments

Comments
 (0)