File tree Expand file tree Collapse file tree 1 file changed +1
-22
lines changed Expand file tree Collapse file tree 1 file changed +1
-22
lines changed Original file line number Diff line number Diff line change @@ -3,10 +3,6 @@ name: create-azure-self-hosted-runners
3
3
on :
4
4
workflow_dispatch :
5
5
inputs :
6
- amount_of_runners :
7
- description : ' Amount of runners to set up'
8
- required : true
9
- default : 1
10
6
runner_scope :
11
7
type : choice
12
8
required : true
30
26
default : false
31
27
32
28
env :
33
- AMOUNT_OF_RUNNERS : ${{ github.event.inputs.amount_of_runners }}
34
29
ACTIONS_RUNNER_SCOPE : ${{ github.event.inputs.runner_scope }}
35
30
ACTIONS_RUNNER_ORG : " ${{ github.event.inputs.runner_org || github.repository_owner }}"
36
31
ACTIONS_RUNNER_REPO : " ${{ github.event.inputs.runner_repo || github.event.repository.name }}"
55
50
# AZURE_VM_USERNAME - Username of the VM so you can RDP into it
56
51
# AZURE_VM_PASSWORD - Password of the VM so you can RDP into it
57
52
jobs :
58
- create-matrix :
59
- runs-on : ubuntu-latest
60
- outputs :
61
- matrix : ${{ steps.create-matrix.outputs.matrix }}
62
- steps :
63
- - name : Create matrix for setting up runners in parallel
64
- id : create-matrix
65
- run : |
66
- echo "Going to create $AMOUNT_OF_RUNNERS runners"
67
- MATRIX="matrix={\"runner_index\":[$(seq -s "," 1 $AMOUNT_OF_RUNNERS)]}"
68
- echo "Going to use this matrix: $MATRIX"
69
- echo $MATRIX >> $GITHUB_OUTPUT
70
- create-runners :
71
- name : create-runner-${{ matrix.runner_index }}
72
- needs : create-matrix
53
+ create-runner :
73
54
runs-on : ubuntu-latest
74
- strategy :
75
- matrix : ${{ fromJSON(needs.create-matrix.outputs.matrix) }}
76
55
outputs :
77
56
vm_name : ${{ steps.generate-vm-name.outputs.vm_name }}
78
57
steps :
You can’t perform that action at this time.
0 commit comments