Skip to content

Commit

Permalink
Change the trigger for pr check workflow (#435)
Browse files Browse the repository at this point in the history
* change trigger

* remove env
  • Loading branch information
MoChilia authored Apr 17, 2024
1 parent e9468ba commit 19d77c4
Showing 1 changed file with 3 additions and 43 deletions.
46 changes: 3 additions & 43 deletions .github/workflows/azure-login-pr-check.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
name: pr-check

on:
pull_request_target:
pull_request:
branches:
- master
- 'releases/*'
jobs:
az-login-test:
environment: Automation test
runs-on: windows-latest
steps:
- name: Checkout from PR branch
Expand All @@ -28,44 +27,5 @@ jobs:
- name: Build GitHub Action
run: npm run build

- name: 'Az CLI login with subscription'
uses: ./
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}

- run: |
az account show --output none
az vm list --output none
- name: 'Az CLI login without subscription'
uses: ./
with:
creds: ${{ secrets.AZURE_CREDENTIALS_NO_SUB }}
allow-no-subscriptions: true

- run: |
az account show --output none
# az vm list --output none

- name: 'Azure PowerShell login with subscription'
uses: ./
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
enable-AzPSSession: true

- uses: azure/powershell@v1
with:
inlineScript: "(Get-AzContext).Environment.Name"
azPSVersion: "latest"

# - name: 'Azure PowerShell login without subscription'
# uses: ./
# with:
# creds: ${{secrets.AZURE_CREDENTIALS_NO_SUB}}
# enable-AzPSSession: true
# allow-no-subscriptions: true

# - uses: azure/powershell@v1
# with:
# inlineScript: "Get-AzContext"
# azPSVersion: "latest"
- name: Run mock test
run: npm run test

0 comments on commit 19d77c4

Please sign in to comment.