Skip to content

Commit e00e63b

Browse files
committed
perf: parametrize runs-on for tf_plan_apply
1 parent b3dd44d commit e00e63b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/tf_plan_apply.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
description: 'Generate JWKS'
88
default: 'false'
99
type: string
10+
runs_on:
11+
description: 'Runner JSON string'
12+
default: 'ubuntu-latest'
13+
type: string
1014

1115
# Special permissions required for OIDC authentication
1216
permissions:
@@ -17,7 +21,7 @@ permissions:
1721
jobs:
1822
tofu-plan:
1923
name: 'OpenTofu Plan'
20-
runs-on: [self-hosted, "${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref || github.ref_name }}"]
24+
runs-on: ${{ toJson(inputs.runs_on) }}
2125
environment: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref || github.ref_name }}
2226
env:
2327
ENVIRONMENT_NAME: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref || github.ref_name }}
@@ -87,7 +91,7 @@ jobs:
8791
name: 'OpenTofu Apply'
8892
needs: [tofu-plan]
8993
if: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && needs.tofu-plan.outputs.tf-plan-exit-code == 2 }}
90-
runs-on: [self-hosted, "${{ github.ref_name }}"]
94+
runs-on: ${{ toJson(inputs.runs_on) }}
9195
environment: ${{ github.ref_name }}
9296
env:
9397
ENVIRONMENT_NAME: ${{ github.ref_name }}

0 commit comments

Comments
 (0)