-
Notifications
You must be signed in to change notification settings - Fork 24
73 lines (63 loc) · 1.92 KB
/
validate.yaml
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
name: Validate terraform
on:
pull_request:
branches: [ 'main' ]
permissions:
contents: read
jobs:
validate:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
module:
- audit-serviceaccount
- authorize-private-service
- bucket-events
- cloudevent-broker
- cloudevent-trigger
- cloudevent-recorder
- regional-go-service
- serverless-gclb
- otel-collector
- networking
- dashboard/service
- dashboard/job
- dashboard/cloudevent-receiver
- prober
- cron
- configmap
- secret
- github-wif-provider
- github-gsa
- github-events
- github-bots
steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- uses: hashicorp/setup-terraform@a1502cd9e758c50496cc9ac5308c4843bcd56d36 # v3.0.0
- working-directory: modules/${{ matrix.module }}
run: |
terraform init
terraform validate
conclusion:
permissions:
actions: read
needs: validate
runs-on: ubuntu-latest
if: always()
steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit
- uses: technote-space/workflow-conclusion-action@45ce8e0eb155657ab8ccf346ade734257fd196a5 # v3.0.3
- if: ${{ env.WORKFLOW_CONCLUSION == 'success' }}
working-directory: /tmp
run: echo ${{ env.WORKFLOW_CONCLUSION }} && exit 0
- if: ${{ env.WORKFLOW_CONCLUSION == 'failure' }}
working-directory: /tmp
run: echo ${{ env.WORKFLOW_CONCLUSION }} && exit 1