Skip to content

fix(multi-runner): make v2 inputs independent #290

fix(multi-runner): make v2 inputs independent

fix(multi-runner): make v2 inputs independent #290

Workflow file for this run

name: "MiniStack Terraform lifecycle"
on:
push:
branches:
- main
paths:
- ".github/workflows/ministack.yml"
- "tests/ministack/**"
- "*.tf"
- "policies/**"
- "examples/**"
- "modules/**"
pull_request:
paths:
- ".github/workflows/ministack.yml"
- "tests/ministack/**"
- "*.tf"
- "policies/**"
- "examples/**"
- "modules/**"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
env:
AWS_ACCESS_KEY_ID: "000000000000"
AWS_DEFAULT_REGION: eu-west-1
AWS_EC2_METADATA_DISABLED: "true"
AWS_ENDPOINT_URL: http://127.0.0.1:4566
AWS_REGION: eu-west-1
AWS_SECRET_ACCESS_KEY: test-only
TF_IN_AUTOMATION: "true"
TF_INPUT: "false"
jobs:
terraform_lifecycle:
name: Apply/destroy ${{ matrix.example }} against MiniStack (Terraform ${{ matrix.terraform }})
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
max-parallel: 4
matrix:
example:
- base
- prebuilt
- default
- ephemeral
- multi-runner
- termination-watcher
terraform:
- "1.4.0"
- latest
services:
ministack:
image: ghcr.io/ministackorg/ministack:1.5.7@sha256:37361b9ef886463d5632d5a4b2d114da4b7a5c5793f52f07dbc72579f2fd9207
ports:
- 4566:4566
env:
MINISTACK_ACCOUNT_ID: "000000000000"
MINISTACK_REGION: eu-west-1
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@e14015d583714f6e62063499dc959a02595150a1 # v2.21.1
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup Terraform
uses: hashicorp/setup-terraform@dfe3c3f87815947d99a8997f908cb6525fc44e9e # v4.0.1
with:
terraform_version: ${{ matrix.terraform }}
terraform_wrapper: false
- name: Mark repository as safe
shell: sh
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- id: init
name: Terraform init
env:
EXAMPLE: ${{ matrix.example }}
run: tests/ministack/run-example.sh init "$EXAMPLE"
- id: apply
name: Terraform apply
env:
EXAMPLE: ${{ matrix.example }}
run: tests/ministack/run-example.sh apply "$EXAMPLE"
- name: Terraform destroy
if: always() && steps.init.outcome == 'success'
env:
EXAMPLE: ${{ matrix.example }}
run: tests/ministack/run-example.sh destroy "$EXAMPLE"