Skip to content

Commit

Permalink
Add runner input
Browse files Browse the repository at this point in the history
  • Loading branch information
Resonance1584 committed Jun 11, 2024
1 parent cba0c8a commit 1f06319
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/pipelines-root.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Pipelines Execute
run-name: Run Gruntwork Pipelines
on:
workflow_call:
inputs:
runner:
type: string
default: "ubuntu-latest"
secrets:
PIPELINES_READ_TOKEN:
required: true
Expand All @@ -17,7 +21,7 @@ env:
jobs:
detect_changes:
name: Detect Infrastructure Changes
runs-on: ubuntu-latest
runs-on: [${{ inputs.runner }}]
steps:
- name: Checkout Pipelines Actions
uses: actions/checkout@v4
Expand Down Expand Up @@ -50,7 +54,7 @@ jobs:
pipelines_determine:
name: ${{ contains(matrix.jobs.Action.Command, 'plan') && 'Plan' || 'Apply' }} - ${{ matrix.jobs.ChangeType }} - ${{ matrix.jobs.WorkingDirectory }}
needs: [detect_changes]
runs-on: ubuntu-latest
runs-on: [${{ inputs.runner }}]
# GHA can't check for length, so we just check if there is an item in the 0 index
if: fromJson(needs.detect_changes.outputs.pipelines_jobs)[0] != null
strategy:
Expand Down Expand Up @@ -146,7 +150,7 @@ jobs:
pipelines_apply_baselines:
name: Baseline Child Account ${{ contains(matrix.jobs.Action.Command, 'plan') && 'Plan' || 'Apply' }} - ${{ matrix.jobs.Name }} (${{ matrix.jobs.ID }})
needs: [detect_changes, pipelines_determine]
runs-on: ubuntu-latest
runs-on: [${{ inputs.runner }}]
# GHA can't check for length, so we just check if there is an item in the 0 index
if: fromJson(needs.detect_changes.outputs.pipelines_jobs)[0].NewAccounts[0] != null
strategy:
Expand Down Expand Up @@ -197,7 +201,7 @@ jobs:
pipelines_setup_delegated_repo:
name: "Setup Delegated Repo"
needs: [detect_changes, pipelines_apply_baselines, pipelines_determine]
runs-on: ubuntu-latest
runs-on: [${{ inputs.runner }}]
# GHA can't check for length, so we just check if there is an item in the 0 index
if: ${{ fromJson(needs.detect_changes.outputs.pipelines_jobs)[0].NewAccounts[0] != null && needs.pipelines_determine.outputs.delegate_management == 'true' && needs.pipelines_determine.outputs.terragrunt_command == 'run-all apply' }}
steps:
Expand Down

0 comments on commit 1f06319

Please sign in to comment.