Update actions/checkout action to v4 #63
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Terraform | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
types: [opened, reopened, synchronize] | |
branches: [main] | |
release: | |
types: [published] | |
jobs: | |
check-format: | |
runs-on: ubuntu-latest | |
container: hashicorp/terraform | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 | |
- name: Terraform Format Check | |
run: terraform fmt -check -recursive -diff | |
validate: | |
runs-on: ubuntu-latest | |
container: hashicorp/terraform | |
strategy: | |
matrix: { | |
dir: ['examples/test'] | |
} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 | |
- name: Terraform Init | |
run: terraform init -upgrade | |
working-directory: ${{ matrix.dir }} | |
- name: Terraform Validate | |
run: terraform validate | |
working-directory: ${{ matrix.dir }} | |
mock-plan: | |
runs-on: ubuntu-latest | |
container: hashicorp/terraform | |
strategy: | |
matrix: { | |
dir: ['examples/test'] | |
} | |
services: | |
localstack: | |
image: localstack/localstack | |
env: | |
SERVICES: apigateway,cloudformation,cloudwatch,dynamodb,es,firehose,iam,kinesis,lambda,route53,redshift,s3,secretsmanager,ses,sns,sqs,ssm,stepfunctions,sts | |
ports: | |
- 4566:4566 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 | |
- name: Terraform Init | |
run: terraform init -upgrade | |
working-directory: ${{ matrix.dir }} | |
- name: Terraform Plan (Mock) | |
run: terraform plan | |
working-directory: ${{ matrix.dir }} | |
infracost: | |
runs-on: ubuntu-latest | |
name: Show infracost diff | |
strategy: | |
matrix: { | |
dir: ['examples/test'] | |
} | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 | |
- name: Run infracost diff | |
uses: infracost/infracost-gh-action@master | |
env: | |
INFRACOST_API_KEY: ${{ secrets.INFRACOST_API_KEY }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
path: ${{ matrix.dir }} |