-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (61 loc) · 1.99 KB
/
Copy pathterraform.yaml
File metadata and controls
75 lines (61 loc) · 1.99 KB
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
63
64
65
66
67
68
69
70
71
72
73
74
75
name: terraform
on:
pull_request:
paths:
- "**/*.tf"
- ".terraform.lock.hcl"
- "Makefile"
- "README.md"
- "scripts/test-publisher-allowlist.sh"
- "scripts/test-wif-workflow-allowlist.sh"
- "tests/**"
- "terraform.tfvars.example"
- ".github/workflows/terraform.yaml"
push:
branches:
- main
paths:
- "**/*.tf"
- ".terraform.lock.hcl"
- "Makefile"
- "README.md"
- "scripts/test-publisher-allowlist.sh"
- "scripts/test-wif-workflow-allowlist.sh"
- "tests/**"
- "terraform.tfvars.example"
- ".github/workflows/terraform.yaml"
permissions:
contents: read
concurrency:
group: terraform-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
validate:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- name: Set up Terraform
uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3
with:
terraform_version: 1.15.2
- name: Set up Go
uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6
with:
go-version: "1.26.5"
- name: Install terraform-docs
run: go install github.com/terraform-docs/terraform-docs@v0.20.0
- name: Check formatting
run: terraform fmt -check -diff
- name: Check generated documentation
run: terraform-docs markdown table --lockfile=false --output-check --output-file README.md .
- name: Check pre-v1 package publisher allowlist
run: bash scripts/test-publisher-allowlist.sh
- name: Check package publisher workflow identity allowlist
run: bash scripts/test-wif-workflow-allowlist.sh
- name: Initialize without backend
run: terraform init -backend=false -lockfile=readonly
- name: Validate
run: terraform validate
- name: Test
run: terraform test