File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 23
23
type : string
24
24
required : false
25
25
description : Repo to deploy the runner to. Only needed if runner_scope is set to "repo-level" (defaults to current repository)
26
+ deallocate_immediately :
27
+ type : boolean
28
+ required : true
29
+ description : Deallocate the runner immediately after creating it (useful for spinning up runners preemptively)
30
+ default : true
26
31
27
32
env :
28
33
AMOUNT_OF_RUNNERS : ${{ github.event.inputs.amount_of_runners }}
29
34
ACTIONS_RUNNER_SCOPE : ${{ github.event.inputs.runner_scope }}
30
35
ACTIONS_RUNNER_ORG : " ${{ github.event.inputs.runner_org || github.repository_owner }}"
31
36
ACTIONS_RUNNER_REPO : " ${{ github.event.inputs.runner_repo || github.event.repository.name }}"
37
+ DEALLOCATE_IMMEDIATELY : ${{ github.event.inputs.deallocate_immediately }}
32
38
# This has to be a public URL that the VM can access after creation
33
39
POST_DEPLOYMENT_SCRIPT_URL : https://raw.githubusercontent.com/${{ github.repository }}/${{ github.ref_name }}/azure-self-hosted-runners/post-deployment-script.ps1
34
40
@@ -138,6 +144,7 @@ jobs:
138
144
parameters : ./azure-self-hosted-runners/azure-arm-template-example-parameters.json githubActionsRunnerRegistrationUrl="${{ env.ACTIONS_RUNNER_REGISTRATION_URL }}" githubActionsRunnerToken="${{ env.ACTIONS_RUNNER_TOKEN }}" postDeploymentPsScriptUrl="${{ env.POST_DEPLOYMENT_SCRIPT_URL }}" virtualMachineName=${{ steps.generate-vm-name.outputs.vm_name }} virtualMachineSize=Standard_D8pls_v5 publicIpAddressName1=${{ steps.generate-vm-name.outputs.vm_name }}-ip adminUsername=${{ secrets.AZURE_VM_USERNAME }} adminPassword=${{ secrets.AZURE_VM_PASSWORD }}
139
145
140
146
- name : Deallocate the VM for later use
147
+ if : env.DEALLOCATE_IMMEDIATELY == 'true'
141
148
uses : azure/CLI@v1
142
149
with :
143
150
azcliversion : 2.43.0
You can’t perform that action at this time.
0 commit comments