Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions .github/workflows/continuous-delivery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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 }}
Expand Down Expand Up @@ -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
Expand Down
40 changes: 29 additions & 11 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -35,15 +47,16 @@ 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

- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version-file: .node-version
node-version: '22'

- name: Install Dependencies
run: npm i
Expand All @@ -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
Expand All @@ -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 }}
Expand Down Expand Up @@ -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 }}
Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -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 }}
Expand All @@ -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 }}
Expand Down Expand Up @@ -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
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/pull-request-cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading