-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (42 loc) · 1.41 KB
/
infra-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: QA
on:
push:
branches:
- main
- renovate/*
permissions:
contents: read
id-token: write
env:
# renovate: datasource=github-releases depName=hashicorp/terraform versioning=hashicorp
TERRAFORM_VERSION: "1.10.3"
jobs:
qa:
name: QA
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3
with:
terraform_version: ${{ env.TERRAFORM_VERSION }}
- name: Format Checkout
run: terraform fmt -check -diff -recursive terraform
- name: Run tflint
run: |
podman run --rm -v $(pwd):/data -t ghcr.io/terraform-linters/tflint --init
podman run --rm -v $(pwd):/data -t ghcr.io/terraform-linters/tflint --recursive
- name: Environment Info
run: |
echo "ref: ${{ github.ref }}"
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4
with:
role-to-assume: arn:aws:iam::022327457572:role/ks-infrastructure-maintainer
aws-region: eu-west-1
- name: Terraform Init
run: terraform init
working-directory: terraform
- name: Terraform Plan
run: terraform plan -lock-timeout=20m
working-directory: terraform