Skip to content

Commit 6a3bcca

Browse files
samuelho-devclaude
andcommitted
feat: add runs-on input to all reusable workflows, default to homelab-runners
All reusable workflows now accept a runs-on input parameter so callers can specify their runner. Defaults to homelab-runners to avoid consuming paid GitHub Actions minutes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 9f2ccba commit 6a3bcca

7 files changed

Lines changed: 37 additions & 7 deletions

File tree

.github/workflows/docker-build-push.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ on:
6767
required: false
6868
type: boolean
6969
default: false
70+
runs-on:
71+
description: 'Runner label to execute the job on'
72+
required: false
73+
type: string
74+
default: 'homelab-runners'
7075
secrets:
7176
registry-username:
7277
description: 'Registry username'
@@ -95,7 +100,7 @@ permissions:
95100
jobs:
96101
build:
97102
name: Build & Push Docker Image
98-
runs-on: ubuntu-latest
103+
runs-on: ${{ inputs.runs-on }}
99104
timeout-minutes: 30
100105
outputs:
101106
digest: ${{ steps.build.outputs.digest }}

.github/workflows/gitleaks-scan.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ on:
3838
required: false
3939
type: string
4040
default: 'info'
41+
runs-on:
42+
description: 'Runner label to execute the job on'
43+
required: false
44+
type: string
45+
default: 'homelab-runners'
4146
outputs:
4247
findings-count:
4348
description: 'Number of secrets found'
@@ -53,7 +58,7 @@ permissions:
5358
jobs:
5459
scan:
5560
name: Gitleaks Secret Scan
56-
runs-on: ubuntu-latest
61+
runs-on: ${{ inputs.runs-on }}
5762
timeout-minutes: 10
5863
outputs:
5964
findings: ${{ steps.count.outputs.findings }}

.github/workflows/helm-publish.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ on:
4242
required: false
4343
type: boolean
4444
default: true
45+
runs-on:
46+
description: 'Runner label to execute the job on'
47+
required: false
48+
type: string
49+
default: 'homelab-runners'
4550
secrets:
4651
registry-username:
4752
description: 'Registry username (defaults to github.actor)'
@@ -74,7 +79,7 @@ permissions:
7479
jobs:
7580
publish:
7681
name: Package & Publish Chart
77-
runs-on: ubuntu-latest
82+
runs-on: ${{ inputs.runs-on }}
7883
timeout-minutes: 15
7984
outputs:
8085
version: ${{ steps.chart-info.outputs.version }}

.github/workflows/sbom-generate.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ on:
3838
required: false
3939
type: boolean
4040
default: true
41+
runs-on:
42+
description: 'Runner label to execute the job on'
43+
required: false
44+
type: string
45+
default: 'homelab-runners'
4146
secrets:
4247
registry-username:
4348
description: 'Registry username (for private images)'
@@ -61,7 +66,7 @@ permissions:
6166
jobs:
6267
generate:
6368
name: Generate SBOM
64-
runs-on: ubuntu-latest
69+
runs-on: ${{ inputs.runs-on }}
6570
timeout-minutes: 15
6671
outputs:
6772
sbom-path: ${{ inputs.output-file }}

.github/workflows/sync-main-to-dev.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ on:
2323
required: false
2424
type: string
2525
default: 'automated,sync'
26+
runs-on:
27+
description: 'Runner label to execute the job on'
28+
required: false
29+
type: string
30+
default: 'homelab-runners'
2631
secrets:
2732
token:
2833
description: 'GitHub token with repo write access (falls back to GITHUB_TOKEN)'
@@ -42,7 +47,7 @@ permissions:
4247
jobs:
4348
sync:
4449
name: Sync ${{ inputs.source-branch }} to ${{ inputs.target-branch }}
45-
runs-on: ubuntu-latest
50+
runs-on: ${{ inputs.runs-on }}
4651
timeout-minutes: 10
4752
outputs:
4853
result: ${{ steps.result.outputs.result }}

.github/workflows/test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ on:
1515
jobs:
1616
test-workflow-outputs:
1717
name: Test Docker Workflow Outputs
18-
runs-on: ubuntu-latest
18+
runs-on: homelab-runners
1919
steps:
2020
- uses: actions/checkout@v4
2121

.github/workflows/trivy-scan.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ on:
4848
required: false
4949
type: string
5050
default: '10m'
51+
runs-on:
52+
description: 'Runner label to execute the job on'
53+
required: false
54+
type: string
55+
default: 'homelab-runners'
5156
outputs:
5257
findings-count:
5358
description: 'Number of security findings'
@@ -63,7 +68,7 @@ permissions:
6368
jobs:
6469
scan:
6570
name: Trivy Security Scan
66-
runs-on: ubuntu-latest
71+
runs-on: ${{ inputs.runs-on }}
6772
timeout-minutes: 15
6873
outputs:
6974
findings: ${{ steps.scan.outputs.findings }}

0 commit comments

Comments
 (0)