Compare commits

...

1 commit

Author SHA1 Message Date
Yan Xu
9dfca5820a
use the latest auzre/powershell@v3 (#581) 2026-03-24 10:12:40 +08:00
4 changed files with 24 additions and 24 deletions

View file

@ -37,7 +37,7 @@ jobs:
creds: ${{ secrets.AZURE_CREDENTIALS }}
enable-AzPSSession: true
- uses: azure/powershell@v1
- uses: azure/powershell@v3
with:
inlineScript: "(Get-AzContext).Environment.Name"
azPSVersion: "latest"
@ -49,7 +49,7 @@ jobs:
enable-AzPSSession: true
allow-no-subscriptions: true
- uses: azure/powershell@v1
- uses: azure/powershell@v3
with:
inlineScript: "(Get-AzContext).Environment.Name"
azPSVersion: "latest"
@ -87,7 +87,7 @@ jobs:
subscription-id: ${{ secrets.AZURE_SUBSCRIPTIONID }}
enable-AzPSSession: true
- uses: azure/powershell@v1
- uses: azure/powershell@v3
with:
inlineScript: "(Get-AzContext).Environment.Name"
azPSVersion: "latest"
@ -100,7 +100,7 @@ jobs:
enable-AzPSSession: true
allow-no-subscriptions: true
- uses: azure/powershell@v1
- uses: azure/powershell@v3
with:
inlineScript: "(Get-AzContext).Environment.Name"
azPSVersion: "latest"
@ -126,4 +126,4 @@ jobs:
- name: Post to slack
shell: bash
run: curl -X POST -H 'Content-type:application/json' --data '{"blocks":[{"type":"section","text":{"type":"mrkdwn","text":"${{steps.slack_report.outputs.report}}"}}]}' https://hooks.slack.com/services/${{SECRETS.SLACK_CHANNEL_SECRET}}
run: curl -X POST -H 'Content-type:application/json' --data '{"blocks":[{"type":"section","text":{"type":"mrkdwn","text":"${{steps.slack_report.outputs.report}}"}}]}' https://hooks.slack.com/services/${{SECRETS.SLACK_CHANNEL_SECRET}}

View file

@ -58,7 +58,7 @@ jobs:
- name: Run Azure PowerShell
id: ps_3
continue-on-error: true
uses: azure/powershell@v1
uses: azure/powershell@v3
with:
azPSVersion: "latest"
inlineScript: |
@ -186,7 +186,7 @@ jobs:
- name: Run Azure PowerShell
id: ps_8
continue-on-error: true
uses: azure/powershell@v1
uses: azure/powershell@v3
with:
azPSVersion: "latest"
inlineScript: |
@ -216,7 +216,7 @@ jobs:
- name: Run Azure PowerShell
id: ps_9
continue-on-error: true
uses: azure/powershell@v1
uses: azure/powershell@v3
with:
azPSVersion: "latest"
inlineScript: |
@ -332,4 +332,4 @@ jobs:
uses: actions/github-script@v7
with:
script: |
core.setFailed('Last action should fail but not. Please check it.')
core.setFailed('Last action should fail but not. Please check it.')

View file

@ -47,7 +47,7 @@ jobs:
az vm list --output none
- name: Run Azure PowerShell
uses: azure/powershell@v2
uses: azure/powershell@v3
with:
azPSVersion: "latest"
inlineScript: |
@ -69,7 +69,7 @@ jobs:
az account show --output none
- name: Run Azure PowerShell again
uses: azure/powershell@v2
uses: azure/powershell@v3
with:
azPSVersion: "latest"
inlineScript: |
@ -92,7 +92,7 @@ jobs:
az vm list --output none
- name: Run Azure PowerShell
uses: azure/powershell@v2
uses: azure/powershell@v3
with:
azPSVersion: "latest"
inlineScript: |
@ -160,7 +160,7 @@ jobs:
az vm list --output none
- name: Run Azure PowerShell
uses: azure/powershell@v2
uses: azure/powershell@v3
with:
azPSVersion: "latest"
inlineScript: |
@ -183,7 +183,7 @@ jobs:
az account show --output none
- name: Run Azure PowerShell again
uses: azure/powershell@v2
uses: azure/powershell@v3
with:
azPSVersion: "latest"
inlineScript: |
@ -209,7 +209,7 @@ jobs:
}
- name: Run Azure PowerShell
uses: azure/powershell@v2
uses: azure/powershell@v3
with:
azPSVersion: "latest"
inlineScript: |
@ -230,7 +230,7 @@ jobs:
az account show --output none
- name: Run Azure PowerShell
uses: azure/powershell@v2
uses: azure/powershell@v3
with:
azPSVersion: "latest"
inlineScript: |
@ -309,8 +309,8 @@ jobs:
az group list --output none
- name: Run Azure PowerShell again
uses: azure/powershell@v2
uses: azure/powershell@v3
with:
azPSVersion: "latest"
inlineScript: |
$checkResult = Get-AzResourceGroup
$checkResult = Get-AzResourceGroup

View file

@ -238,7 +238,7 @@ jobs:
az account show
- name: Azure PowerShell script
uses: azure/powershell@v2
uses: azure/powershell@v3
with:
azPSVersion: "latest"
inlineScript: |
@ -325,7 +325,7 @@ jobs:
az account show
- name: Azure PowerShell script
uses: azure/powershell@v2
uses: azure/powershell@v3
with:
azPSVersion: "latest"
inlineScript: |
@ -396,7 +396,7 @@ jobs:
az account show
- name: Azure PowerShell script
uses: azure/powershell@v2
uses: azure/powershell@v3
with:
azPSVersion: "latest"
inlineScript: |
@ -463,7 +463,7 @@ jobs:
az account show
- name: Azure PowerShell script
uses: azure/powershell@v2
uses: azure/powershell@v3
with:
azPSVersion: "latest"
inlineScript: |
@ -549,7 +549,7 @@ jobs:
az account show
- name: Run Azure PowerShell
uses: azure/powershell@v2
uses: azure/powershell@v3
with:
azPSVersion: "latest"
inlineScript: |
@ -705,4 +705,4 @@ provided by the bot. You will only need to do this once across all repos using o
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.