-
Notifications
You must be signed in to change notification settings - Fork 7
40 lines (33 loc) · 912 Bytes
/
Assignment1.yml
File metadata and controls
40 lines (33 loc) · 912 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Assignment1
on:
push:
branches:
- Assignment-1
workflow_dispatch:
permissions:
id-token: write
contents: read
jobs:
list-resources:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Azure login with OIDC
uses: azure/login@v2
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
enable-AzPSSession: true
- name: Verify Azure connection
run: |
echo "Successfully logged into Azure"
az account show
az resource list --output table
- name: Run Assignment1 PowerShell script
uses: azure/powershell@v2
with:
inlineScript: |
./Assignment1/Assignment1.ps1
azPSVersion: "latest"