Skip to content

Commit

Permalink
added az login and az commands
Browse files Browse the repository at this point in the history
  • Loading branch information
githubofkrishnadhas committed Dec 7, 2023
1 parent 7d05d7b commit cd949c7
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/start_azure_vm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,25 @@ jobs:
start-or-stop-azure-virtual-machine:
runs-on: ubuntu-latest
name: ${{ github.actor }} ${{ github.event.inputs.action }} ${{github.event.inputs.vm_name}} VM
env:
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
AZURE_SECRET: ${{ secrets.AZURE_SECRET }}
steps:
- name: echo inputs
run: |
echo " action ${{github.event.inputs.action}} vmname ${{github.event.inputs.vm_name}} "
- name: azure login
uses: azure/login@v1
with:
creds: ${{secrets.AZURE_CREDENTIALS}}
- name: az cli commands
uses: azure/CLI@v1
with:
azcliversion: 2.55.0
inlinescript: |
az account set -s ${{ secrets.AZURE_SUBSCRIPTION_ID }}
az account show -o json

0 comments on commit cd949c7

Please sign in to comment.