Skip to content

Commit 3c005ee

Browse files
authored
Merge pull request #60 from git-for-windows/self-hosted-runner-improvements
Self hosted runner: update image and make configurable through env vars
2 parents 8def9c6 + db516f6 commit 3c005ee

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.github/workflows/create-azure-self-hosted-runners.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ env:
3939
# For more information, see https://learn.microsoft.com/en-us/azure/virtual-machines/dplsv5-dpldsv5-series (which
4040
# unfortunately does not have more information about price by region)
4141
AZURE_VM_REGION: westus2
42+
AZURE_VM_IMAGE: win11-23h2-ent
4243

4344
# The following secrets are required for this workflow to run:
4445
# AZURE_CREDENTIALS - Credentials for the Azure CLI. It's recommended to set up a resource
@@ -130,6 +131,7 @@ jobs:
130131
githubActionsRunnerRegistrationUrl="$ACTIONS_RUNNER_REGISTRATION_URL"
131132
githubActionsRunnerToken="$ACTIONS_RUNNER_TOKEN"
132133
postDeploymentPsScriptUrl="$POST_DEPLOYMENT_SCRIPT_URL"
134+
virtualMachineImage="$AZURE_VM_IMAGE"
133135
virtualMachineName="${{ steps.generate-vm-name.outputs.vm_name }}"
134136
virtualMachineSize="$AZURE_VM_TYPE"
135137
publicIpAddressName1="${{ steps.generate-vm-name.outputs.vm_name }}-ip"

azure-self-hosted-runners/azure-arm-template.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@
8181
"osDiskDeleteOption": {
8282
"type": "string"
8383
},
84+
"virtualMachineImage": {
85+
"type": "string"
86+
},
8487
"virtualMachineSize": {
8588
"type": "string"
8689
},
@@ -209,7 +212,7 @@
209212
"imageReference": {
210213
"publisher": "microsoftwindowsdesktop",
211214
"offer": "windows11preview-arm64",
212-
"sku": "win11-22h2-ent",
215+
"sku": "[parameters('virtualMachineImage')]",
213216
"version": "latest"
214217
}
215218
},

0 commit comments

Comments
 (0)