Skip to content
This repository was archived by the owner on Jan 16, 2025. It is now read-only.

Commit a3b1133

Browse files
committed
feat: Added runner labels as output.
1 parent 5b14eab commit a3b1133

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

main.tf

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ locals {
99
}
1010

1111
default_runner_labels = "self-hosted,${var.runner_os},${var.runner_architecture}"
12+
runner_labels = var.runner_extra_labels != "" ? "${local.default_runner_labels},${var.runner_extra_labels}" : local.default_runner_labels
1213
}
1314

1415
resource "random_string" "random" {
@@ -145,8 +146,7 @@ module "webhook" {
145146
# labels
146147
enable_workflow_job_labels_check = var.runner_enable_workflow_job_labels_check
147148
workflow_job_labels_check_all = var.runner_enable_workflow_job_labels_check_all
148-
runner_labels = var.runner_extra_labels != "" ? "${local.default_runner_labels},${var.runner_extra_labels}" : local.default_runner_labels
149-
149+
runner_labels = local.runner_labels
150150
role_path = var.role_path
151151
role_permissions_boundary = var.role_permissions_boundary
152152
repository_white_list = var.repository_white_list

outputs.tf

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ output "runners" {
1010
role_scale_up = module.runners.role_scale_up
1111
role_scale_down = module.runners.role_scale_down
1212
role_pool = module.runners.role_pool
13+
labels = sort(split(",", local.runner_labels))
1314
}
1415
}
1516

0 commit comments

Comments
 (0)