Skip to content

An example of using workflow dispatch for creating virtual machines in Azure

License

Notifications You must be signed in to change notification settings

seekdavidlee/az-vm-workflow-dispatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

An example of using workflow dispatch for creating virtual machines in Azure.

To invoke, use the following as an example.

$auth="<Enter your personal access token here>"
$headers = @{"Accept"="application/vnd.github.v3+json"; "Authorization"="token $auth"}
$payload = @{ "ref"="refs/heads/dev"; "inputs" =@{ "vmSku"="Standard_B2ms"; "vmCount"=3; } }
$body = $payload | ConvertTo-Json
$uri="https://api.github.com/repos/seekdavidlee/az-vm-workflow-dispatch/actions/workflows/app.yml/dispatches"
Invoke-WebRequest -Uri $uri -Headers $headers -UseBasicParsing -Body $body -Method POST

More information can be found on https://docs.github.com/en/rest/reference/actions#create-a-workflow-dispatch-event.

About

An example of using workflow dispatch for creating virtual machines in Azure

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published