Skip to content

Commit d706073

Browse files
committed
self-hosted-runners: set a couple of sensible defaults
This makes it more convenient to run this workflow manually. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent c683f89 commit d706073

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

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

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,27 @@ on:
66
amount_of_runners:
77
description: 'Amount of runners to set up'
88
required: true
9+
default: 1
910
runner_scope:
1011
type: choice
1112
required: true
1213
description: Scope of the runner. On personal accounts, only "repo-level" works
1314
options:
1415
- org-level
1516
- repo-level
17+
default: repo-level
1618
runner_org:
1719
type: string
18-
required: true
19-
description: Organization or personal account to deploy the runner to
20+
required: false
21+
description: Organization or personal account to deploy the runner to (defaults to the repository owner)
2022
runner_repo:
2123
type: string
2224
required: false
23-
description: Repo to deploy the runner to. Only needed if runner_scope is set to "repo-level"
25+
description: Repo to deploy the runner to. Only needed if runner_scope is set to "repo-level" (defaults to current repository)
2426

2527
env:
26-
ACTIONS_RUNNER_ORG: "${{ github.event.inputs.runner_org }}"
27-
ACTIONS_RUNNER_REPO: "${{ github.event.inputs.runner_repo }}"
28+
ACTIONS_RUNNER_ORG: "${{ github.event.inputs.runner_org || github.repository_owner }}"
29+
ACTIONS_RUNNER_REPO: "${{ github.event.inputs.runner_repo || github.event.repository.name }}"
2830
# This has to be a public URL that the VM can access after creation
2931
POST_DEPLOYMENT_SCRIPT_URL: https://raw.githubusercontent.com/${{ github.repository }}/${{ github.ref_name }}/azure-self-hosted-runners/post-deployment-script.ps1
3032

0 commit comments

Comments
 (0)