Skip to content

Commit

Permalink
upgrade form v1 to v2 (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
VeryEarly authored Mar 27, 2024
1 parent aa12118 commit 1448d3a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ jobs:
steps:

- name: Login via Az module
uses: azure/login@v1
uses: azure/login@v2
with:
creds: ${{secrets.AZURE_CREDENTIALS}}
enable-AzPSSession: true

- name: Run Azure PowerShell inline script
uses: azure/powershell@v1
uses: azure/powershell@v2
with:
inlineScript: |
Get-AzVM -ResourceGroupName "ResourceGroup11"
Expand Down Expand Up @@ -73,13 +73,13 @@ jobs:
uses: actions/checkout@v3
- name: Login Azure
uses: azure/login@v1
uses: azure/login@v2
with:
creds: ${{secrets.AZURE_CREDENTIALS}}
enable-AzPSSession: true
- name: Run Azure PowerShell Script File
uses: azure/powershell@v1
uses: azure/powershell@v2
with:
inlineScript: ./scripts/run_azps_cmdlets.ps1
azPSVersion: "latest"
Expand All @@ -90,7 +90,7 @@ You can also run the script file with parameters. For example:

```yaml
- name: Run Azure PowerShell Script File
uses: azure/powershell@v1
uses: azure/powershell@v2
with:
inlineScript: ./scripts/run_azps_cmdlets.ps1 myresourcegroup myresourcename
azPSVersion: "latest"
Expand All @@ -100,7 +100,7 @@ or

```yaml
- name: Run Azure PowerShell Script File
uses: azure/powershell@v1
uses: azure/powershell@v2
with:
inlineScript: ./scripts/run_azps_cmdlets.ps1 -ResourceGroupName myresourcegroup -ResourceName myresourcename
azPSVersion: "latest"
Expand All @@ -110,14 +110,14 @@ or

```yaml
- name: Login to Azure US Gov Cloud with Az Powershell
uses: azure/login@v1
uses: azure/login@v2
with:
creds: ${{ secrets.AZURE_US_GOV_CREDENTIALS }}
environment: 'AzureUSGovernment'
enable-AzPSSession: true
- name: Run powershell command in US Gov Cloud
uses: azure/powershell@v1
uses: azure/powershell@v2
with:
inlineScript: "Get-AzContext"
azPSVersion: "latest"
Expand Down

0 comments on commit 1448d3a

Please sign in to comment.