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 }}"
53
48
# AZURE_VM_USERNAME - Username of the VM so you can RDP into it
54
49
# AZURE_VM_PASSWORD - Password of the VM so you can RDP into it
55
50
jobs :
56
- create-matrix :
57
- runs-on : ubuntu-latest
58
- outputs :
59
- matrix : ${{ steps.create-matrix.outputs.matrix }}
60
- steps :
61
- - name : Create matrix for setting up runners in parallel
62
- id : create-matrix
63
- run : |
64
- echo "Going to create $AMOUNT_OF_RUNNERS runners"
65
- MATRIX="matrix={\"runner_index\":[$(seq -s "," 1 $AMOUNT_OF_RUNNERS)]}"
66
- echo "Going to use this matrix: $MATRIX"
67
- echo $MATRIX >> $GITHUB_OUTPUT
68
- create-runners :
69
- name : create-runner-${{ matrix.runner_index }}
70
- needs : create-matrix
51
+ create-runner :
71
52
runs-on : ubuntu-latest
72
- strategy :
73
- matrix : ${{ fromJSON(needs.create-matrix.outputs.matrix) }}
74
53
outputs :
75
54
vm_name : ${{ steps.generate-vm-name.outputs.vm_name }}
76
55
steps :
You can’t perform that action at this time.
0 commit comments