Skip to content

Commit 85d9b4d

Browse files
committed
ci: use dynamic runner
Signed-off-by: Tamal Saha <tamals@appscode.com>
1 parent 226ef2e commit 85d9b4d

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,22 @@ concurrency:
1414
cancel-in-progress: true
1515

1616
jobs:
17+
label-detector:
18+
name: Runner Label
19+
runs-on: label-detector
20+
outputs:
21+
runs-on: ${{ steps.detector.outputs.label }}
22+
steps:
23+
- name: Detect Label
24+
id: detector
25+
run: |
26+
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idoutputs
27+
echo "label=$(curl -fsSL https://this-is-nats.appscode.ninja/runs-on/${{ github.repository_owner }}?visibility=${{ github.repository_visibility }})" >> $GITHUB_OUTPUT
28+
1729
build:
1830
name: Build
19-
runs-on: ubuntu-24.04
31+
needs: label-detector
32+
runs-on: "${{ needs.label-detector.outputs.runs-on }}"
2033
steps:
2134
- name: Set up Go 1.25
2235
uses: actions/setup-go@v5

0 commit comments

Comments
 (0)