Skip to content

Commit ee654fc

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

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
@@ -13,9 +13,22 @@ concurrency:
1313
cancel-in-progress: true
1414

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

0 commit comments

Comments
 (0)