Skip to content

Instantly share code, notes, and snippets.

@duartefdias
Last active December 30, 2020 16:10
Show Gist options
  • Save duartefdias/44595216f7807caa85416a1cd4f33600 to your computer and use it in GitHub Desktop.
Save duartefdias/44595216f7807caa85416a1cd4f33600 to your computer and use it in GitHub Desktop.
Call powershell script with Azure data
on: [workflow_dispatch]
name: DeployAzureVM
jobs:
CreateAzureVM:
runs-on: windows-latest
steps:
# Checkout code from repo
- name: checkout repo
uses: actions/checkout@v1
# Run powershell script to create VM
- name: RunPowershellScriptFromRepo
env: #Set secrets as environment variables
SP_CLIENT_ID: ${{ secrets.SP_CLIENT_ID }}
SP_CLIENT_SECRET: ${{ secrets.SP_CLIENT_SECRET }}
SP_TENANT_ID: ${{ secrets.SP_TENANT_ID }}
AZURE_SUBSCRIPTION_NAME: ${{ secrets.AZURE_SUBSCRIPTION_NAME }}
run: .\powershell_script\create-vm-azure.ps1
shell: pwsh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment