@@ -33,13 +33,13 @@ jobs:
33
33
steps :
34
34
35
35
- name : Login via Az module
36
- uses : azure/login@v1
36
+ uses : azure/login@v2
37
37
with :
38
38
creds : ${{secrets.AZURE_CREDENTIALS}}
39
39
enable-AzPSSession : true
40
40
41
41
- name : Run Azure PowerShell inline script
42
- uses : azure/powershell@v1
42
+ uses : azure/powershell@v2
43
43
with :
44
44
inlineScript : |
45
45
Get-AzVM -ResourceGroupName "ResourceGroup11"
@@ -73,13 +73,13 @@ jobs:
73
73
uses: actions/checkout@v3
74
74
75
75
- name: Login Azure
76
- uses: azure/login@v1
76
+ uses: azure/login@v2
77
77
with:
78
78
creds: ${{secrets.AZURE_CREDENTIALS}}
79
79
enable-AzPSSession: true
80
80
81
81
- name: Run Azure PowerShell Script File
82
- uses: azure/powershell@v1
82
+ uses: azure/powershell@v2
83
83
with:
84
84
inlineScript: ./scripts/run_azps_cmdlets.ps1
85
85
azPSVersion: "latest"
@@ -90,7 +90,7 @@ You can also run the script file with parameters. For example:
90
90
91
91
` ` ` yaml
92
92
- name: Run Azure PowerShell Script File
93
- uses: azure/powershell@v1
93
+ uses: azure/powershell@v2
94
94
with:
95
95
inlineScript: ./scripts/run_azps_cmdlets.ps1 myresourcegroup myresourcename
96
96
azPSVersion: "latest"
100
100
101
101
` ` ` yaml
102
102
- name: Run Azure PowerShell Script File
103
- uses: azure/powershell@v1
103
+ uses: azure/powershell@v2
104
104
with:
105
105
inlineScript: ./scripts/run_azps_cmdlets.ps1 -ResourceGroupName myresourcegroup -ResourceName myresourcename
106
106
azPSVersion: "latest"
110
110
111
111
` ` ` yaml
112
112
- name: Login to Azure US Gov Cloud with Az Powershell
113
- uses: azure/login@v1
113
+ uses: azure/login@v2
114
114
with:
115
115
creds: ${{ secrets.AZURE_US_GOV_CREDENTIALS }}
116
116
environment: 'AzureUSGovernment'
117
117
enable-AzPSSession: true
118
118
119
119
- name: Run powershell command in US Gov Cloud
120
- uses: azure/powershell@v1
120
+ uses: azure/powershell@v2
121
121
with:
122
122
inlineScript: "Get-AzContext"
123
123
azPSVersion: "latest"
0 commit comments