mirror of
https://github.com/azure/login.git
synced 2026-03-15 09:20:56 -04:00
Create azure-login-pr-check.yml
This commit is contained in:
70
.github/workflows/azure-login-pr-check.yml
vendored
Normal file
70
.github/workflows/azure-login-pr-check.yml
vendored
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
name: pr-check
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request_target:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- 'releases/*'
|
||||||
|
- users/balaga-gayatri/test-automation
|
||||||
|
jobs:
|
||||||
|
az-login-test:
|
||||||
|
environment: Automation test
|
||||||
|
runs-on: windows-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout from PR branch
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
# Using 12.x version as an example
|
||||||
|
- name: Set Node.js 12.x for GitHub Action
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: 12.x
|
||||||
|
|
||||||
|
- name: installing node_modules
|
||||||
|
run: npm install
|
||||||
|
|
||||||
|
- name: Build GitHub Action
|
||||||
|
run: npm run build
|
||||||
|
|
||||||
|
- name: 'Az CLI login with subscription'
|
||||||
|
uses: azure/login@v1
|
||||||
|
with:
|
||||||
|
creds: ${{ secrets.AZURE_CREDENTIALS }}
|
||||||
|
|
||||||
|
- run: |
|
||||||
|
az account show
|
||||||
|
# az webapp list
|
||||||
|
|
||||||
|
- name: 'Az CLI login without subscription'
|
||||||
|
uses: azure/login@v1
|
||||||
|
with:
|
||||||
|
creds: ${{ secrets.AZURE_CREDENTIALS_NO_SUB }}
|
||||||
|
allow-no-subscriptions: true
|
||||||
|
|
||||||
|
- run: |
|
||||||
|
az account show
|
||||||
|
|
||||||
|
- name: 'Azure PowerShell login with subscription'
|
||||||
|
uses: azure/login@v1
|
||||||
|
with:
|
||||||
|
creds: ${{ secrets.AZURE_CREDENTIALS }}
|
||||||
|
enable-AzPSSession: true
|
||||||
|
|
||||||
|
- uses: azure/powershell@v1
|
||||||
|
with:
|
||||||
|
inlineScript: "Get-AzContext"
|
||||||
|
azPSVersion: "latest"
|
||||||
|
|
||||||
|
- name: 'Azure PowerShell login without subscription'
|
||||||
|
uses: azure/login@v1
|
||||||
|
with:
|
||||||
|
creds: ${{secrets.AZURE_CREDENTIALS_NO_SUB}}
|
||||||
|
enable-AzPSSession: true
|
||||||
|
allow-no-subscriptions: true
|
||||||
|
|
||||||
|
- uses: azure/powershell@v1
|
||||||
|
with:
|
||||||
|
inlineScript: "Get-AzContext"
|
||||||
|
azPSVersion: "latest"
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user