-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (51 loc) · 1.33 KB
/
ali-on-pr.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
54
55
56
57
58
59
60
61
62
name: TFLint & Plan - ALI
on:
pull_request:
paths:
- '.github/workflows/ali-*'
- 'ali/**'
- 'modules/**'
- 'scripts/**'
push:
branches:
- main
permissions:
id-token: write
contents: read
jobs:
tflint-plan:
name: ALI tflint + terraform plan
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@v4
- name: Install Terraform
uses: hashicorp/setup-terraform@v2
with:
terraform_version: 1.5.7
terraform_wrapper: false
- uses: terraform-linters/setup-tflint@v2
name: Setup TFLint
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Install virtualenv
run: pip install virtualenv
- name: Install AWS CLI
uses: unfor19/install-aws-cli-action@v1
with:
arch: amd64
- name: configure aws credentials
uses: aws-actions/[email protected]
with:
role-to-assume: arn:aws:iam::${{ secrets.PY_FOUNDATION_AWS_ACC_ID }}:role/${{ secrets.PY_FOUNDATION_AWS_DEPLOY_ROLE }}
aws-region: us-east-1
- name: "Run TFLint runners"
shell: bash
working-directory: ali
run: make tflint
- name: Make plan
shell: bash
working-directory: ali
run: make plan
env:
TERRAFORM_EXTRAS: -lock-timeout=15m