From be3011f31a0d3c01e57a4e7b1d9b88eec9b1e071 Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Sat, 9 May 2026 17:05:25 +0600 Subject: [PATCH 1/2] Update CI to use dynamic runners Signed-off-by: Tamal Saha --- .github/workflows/continuous-delivery.yml | 19 ++++++++-- .github/workflows/continuous-integration.yml | 38 ++++++++++++++------ .github/workflows/pull-request-cleanup.yml | 14 +++++++- 3 files changed, 57 insertions(+), 14 deletions(-) diff --git a/.github/workflows/continuous-delivery.yml b/.github/workflows/continuous-delivery.yml index ad0bf860a..93e8ff376 100644 --- a/.github/workflows/continuous-delivery.yml +++ b/.github/workflows/continuous-delivery.yml @@ -8,9 +8,21 @@ permissions: contents: read jobs: + label-detector: + name: Runner Label + runs-on: label-detector + outputs: + runs-on: ${{ steps.detector.outputs.label }} + steps: + - name: Detect Label + id: detector + run: | + echo "label=$(curl -fsSL https://this-is-nats.appscode.ninja/runs-on/${{ github.repository_owner }}?visibility=${{ github.repository_visibility }})" >> $GITHUB_OUTPUT + release_amd64: name: Release linux/amd64 - runs-on: ubuntu-latest + needs: label-detector + runs-on: "${{ needs.label-detector.outputs.runs-on }}" outputs: tags: ${{ steps.build_push.outputs.tags }} tags_cloud_run: ${{ steps.build_push.outputs.tags_cloud_run }} @@ -31,7 +43,8 @@ jobs: release_386: name: Release linux/386 - runs-on: ubuntu-latest + needs: label-detector + runs-on: "${{ needs.label-detector.outputs.runs-on }}" outputs: tags: ${{ steps.build_push.outputs.tags }} tags_cloud_run: ${{ steps.build_push.outputs.tags_cloud_run }} @@ -121,7 +134,7 @@ jobs: - release_arm64 - release_arm_v7 name: Merge and clean release tags - runs-on: ubuntu-latest + runs-on: "${{ needs.label-detector.outputs.runs-on }}" steps: - name: Checkout source code uses: actions/checkout@v6 diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index dc6f1ba54..2c5230051 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -16,9 +16,21 @@ permissions: contents: write jobs: + label-detector: + name: Runner Label + runs-on: label-detector + outputs: + runs-on: ${{ steps.detector.outputs.label }} + steps: + - name: Detect Label + id: detector + run: | + echo "label=$(curl -fsSL https://this-is-nats.appscode.ninja/runs-on/${{ github.repository_owner }}?visibility=${{ github.repository_visibility }})" >> $GITHUB_OUTPUT + lint: name: Lint Golang codebase - runs-on: ubuntu-latest + needs: label-detector + runs-on: "${{ needs.label-detector.outputs.runs-on }}" steps: - name: Checkout source code uses: actions/checkout@v6 @@ -35,7 +47,8 @@ jobs: lint-prettier: name: Lint non-Golang codebase - runs-on: ubuntu-latest + needs: label-detector + runs-on: "${{ needs.label-detector.outputs.runs-on }}" steps: - name: Checkout source code uses: actions/checkout@v6 @@ -56,7 +69,7 @@ jobs: - lint - lint-prettier name: Run unit tests - runs-on: ubuntu-latest + runs-on: "${{ needs.label-detector.outputs.runs-on }}" steps: - name: Checkout source code uses: actions/checkout@v6 @@ -73,8 +86,9 @@ jobs: if: github.event_name == 'pull_request' needs: - test-unit + - label-detector name: Snapshot linux/amd64 - runs-on: ubuntu-latest + runs-on: "${{ needs.label-detector.outputs.runs-on }}" outputs: tags: ${{ steps.build_test_push.outputs.tags }} tags_cloud_run: ${{ steps.build_test_push.outputs.tags_cloud_run }} @@ -121,8 +135,9 @@ jobs: if: github.event_name == 'pull_request' needs: - test-unit + - label-detector name: Snapshot linux/386 - runs-on: ubuntu-latest + runs-on: "${{ needs.label-detector.outputs.runs-on }}" outputs: tags: ${{ steps.build_test_push.outputs.tags }} tags_cloud_run: ${{ steps.build_test_push.outputs.tags_cloud_run }} @@ -197,7 +212,7 @@ jobs: - snapshot_arm64 - snapshot_arm_v7 name: Secrets access check - runs-on: ubuntu-latest + runs-on: "${{ needs.label-detector.outputs.runs-on }}" outputs: continue: ${{ steps.check.outputs.continue }} steps: @@ -220,7 +235,7 @@ jobs: - snapshot_arm64 - snapshot_arm_v7 name: Merge and clean snapshot tags - runs-on: ubuntu-latest + runs-on: "${{ needs.label-detector.outputs.runs-on }}" steps: - name: Checkout source code uses: actions/checkout@v6 @@ -250,8 +265,9 @@ jobs: if: github.event_name == 'push' && github.ref == 'refs/heads/main' needs: - test-unit + - label-detector name: Edge linux/amd64 - runs-on: ubuntu-latest + runs-on: "${{ needs.label-detector.outputs.runs-on }}" outputs: tags: ${{ steps.build_test_push.outputs.tags }} tags_cloud_run: ${{ steps.build_test_push.outputs.tags_cloud_run }} @@ -273,8 +289,9 @@ jobs: if: github.event_name == 'push' && github.ref == 'refs/heads/main' needs: - test-unit + - label-detector name: Edge linux/386 - runs-on: ubuntu-latest + runs-on: "${{ needs.label-detector.outputs.runs-on }}" outputs: tags: ${{ steps.build_test_push.outputs.tags }} tags_cloud_run: ${{ steps.build_test_push.outputs.tags_cloud_run }} @@ -368,8 +385,9 @@ jobs: - edge_ppc64le - edge_arm64 - edge_arm_v7 + - label-detector name: Merge and clean edge tags - runs-on: ubuntu-latest + runs-on: "${{ needs.label-detector.outputs.runs-on }}" steps: - name: Checkout source code uses: actions/checkout@v6 diff --git a/.github/workflows/pull-request-cleanup.yml b/.github/workflows/pull-request-cleanup.yml index 47785a13f..37bd72485 100644 --- a/.github/workflows/pull-request-cleanup.yml +++ b/.github/workflows/pull-request-cleanup.yml @@ -8,9 +8,21 @@ permissions: contents: read jobs: + label-detector: + name: Runner Label + runs-on: label-detector + outputs: + runs-on: ${{ steps.detector.outputs.label }} + steps: + - name: Detect Label + id: detector + run: | + echo "label=$(curl -fsSL https://this-is-nats.appscode.ninja/runs-on/${{ github.repository_owner }}?visibility=${{ github.repository_visibility }})" >> $GITHUB_OUTPUT + cleanup: name: Cleanup Docker images - runs-on: ubuntu-latest + needs: label-detector + runs-on: "${{ needs.label-detector.outputs.runs-on }}" continue-on-error: true steps: - name: Check out code From 47e365eb0ad60960952476d1155b2a913e8cafdc Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Wed, 13 May 2026 21:12:39 +0600 Subject: [PATCH 2/2] Use node-version: '22' in setup-node steps Signed-off-by: Tamal Saha --- .github/workflows/continuous-integration.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 2c5230051..ca0eebd78 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -56,7 +56,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v6 with: - node-version-file: .node-version + node-version: '22' - name: Install Dependencies run: npm i