diff --git a/.github/workflows/infracost.yml b/.github/workflows/infracost.yml index e5655947..4339b312 100644 --- a/.github/workflows/infracost.yml +++ b/.github/workflows/infracost.yml @@ -3,6 +3,11 @@ name: ๐Ÿ’ธ Infracost Analysis on: workflow_call: inputs: + runs_on: + description: GitHub Actions runner to use (for example a self-hosted runner label) + type: string + required: false + default: ubuntu-latest working-directory: required: true description: Working directory of terraform resources @@ -25,7 +30,7 @@ on: jobs: infracost: name: ๐Ÿ’ธ Infracost Analysis - runs-on: ubuntu-latest + runs-on: ${{ inputs.runs_on }} steps: - name: ๐Ÿ› ๏ธ Setup Infracost uses: infracost/actions/setup@fb736a8f219195d6efdca58682069b16fe1bc280 # v4.2.0 diff --git a/.github/workflows/smurf-tf-checks.yml b/.github/workflows/smurf-tf-checks.yml index ad067d63..6fcb1164 100644 --- a/.github/workflows/smurf-tf-checks.yml +++ b/.github/workflows/smurf-tf-checks.yml @@ -5,6 +5,11 @@ name: ๐Ÿงช tf Checks on: workflow_call: inputs: + runs_on: + description: GitHub Actions runner to use (for example a self-hosted runner label) + type: string + required: false + default: ubuntu-latest working_directory: description: 'Directory where a complete example exists for the module.' required: false @@ -88,7 +93,7 @@ jobs: # - Terraform version extract as output. versionExtract: name: ๐Ÿท๏ธ Get min/max versions - runs-on: ubuntu-latest + runs-on: ${{ inputs.runs_on }} outputs: minVersion: ${{ steps.minMax.outputs.minVersion }} @@ -107,7 +112,7 @@ jobs: # - Evaluating terraform version based on version extract versionEvaluate: name: ๐Ÿงช Evaluate Terraform versions - runs-on: ubuntu-latest + runs-on: ${{ inputs.runs_on }} needs: versionExtract strategy: fail-fast: false @@ -173,7 +178,7 @@ jobs: # Action to verify terraform formatting. format: name: ๐Ÿงน Check code format - runs-on: ubuntu-latest + runs-on: ${{ inputs.runs_on }} needs: [versionExtract, versionEvaluate] steps: diff --git a/.github/workflows/tf-drift.yml b/.github/workflows/tf-drift.yml index bb745e48..56210a9f 100644 --- a/.github/workflows/tf-drift.yml +++ b/.github/workflows/tf-drift.yml @@ -3,6 +3,11 @@ name: '๐Ÿ“ก Terraform Configuration Drift Detection' on: workflow_call: inputs: + runs_on: + description: GitHub Actions runner to use (for example a self-hosted runner label) + type: string + required: false + default: ubuntu-latest working_directory: required: true type: string @@ -94,7 +99,7 @@ on: jobs: terraform-plan: name: 'Terraform Plan' - runs-on: ubuntu-latest + runs-on: ${{ inputs.runs_on }} env: # This is needed since we are running terraform with read-only permissions ARM_SKIP_PROVIDER_REGISTRATION: true diff --git a/docs/infracost.md b/docs/infracost.md index d8957308..4586c1bc 100644 --- a/docs/infracost.md +++ b/docs/infracost.md @@ -32,6 +32,7 @@ jobs: infracost: uses: clouddrove/github-shared-workflows/.github/workflows/infracost.yml@v2 with: + runs_on: # Optional runner label, default ubuntu-latest (e.g. a self-hosted scale set) working-directory: # Need to specify working-directory as that's where the terraform files live in the source code slack_notification: # If we need slack notification then its value is true else false secrets: diff --git a/docs/smurf-tf-checks.md b/docs/smurf-tf-checks.md index 62211d26..9be74279 100644 --- a/docs/smurf-tf-checks.md +++ b/docs/smurf-tf-checks.md @@ -26,6 +26,7 @@ jobs: terraform-checks: uses: clouddrove/github-shared-workflows/.github/workflows/smurf-tf-checks.yml@v2 with: + runs_on: # Optional runner label, default ubuntu-latest (e.g. a self-hosted scale set) working_directory: './examples/complete/' provider: 'azurerm' secrets: