File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Terraform Apply on Changes
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ paths :
8+ - ' infra/**'
9+ pull_request :
10+ branches :
11+ - main
12+ paths :
13+ - ' infra/**'
14+
15+ concurrency :
16+ group : ${{ github.workflow }}-${{ github.ref }}
17+ cancel-in-progress : true
18+
19+ permissions :
20+ contents : read
21+
22+ jobs :
23+ terraform :
24+ name : Terraform
25+ runs-on : ubuntu-latest
26+
27+ steps :
28+ - name : Checkout code
29+ uses : actions/checkout@v4
30+
31+ - name : Authenticate with Google Cloud
32+ uses : google-github-actions/auth@v2
33+ with :
34+ project_id : ' httparchive'
35+ credentials_json : ' ${{ secrets.GCP_SA_KEY }}'
36+
37+ - name : Set up Terraform
38+ uses : hashicorp/setup-terraform@v3.1.2
39+
40+ - name : Terraform Format Check
41+ working-directory : ./infra
42+ run : terraform fmt -check
43+
44+ - name : Initialize Terraform
45+ working-directory : ./infra
46+ run : terraform init
47+
48+ - name : Validate Terraform
49+ working-directory : ./infra
50+ run : terraform validate
51+
52+ - name : Plan Terraform
53+ working-directory : ./infra
54+ run : terraform plan -out=tfplan
55+
56+ - name : Apply Terraform
57+ if : github.ref == 'refs/heads/main' && github.event_name == 'push'
58+ working-directory : ./infra
59+ run : terraform apply -auto-approve tfplan
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ The test repository is used [for development and testing purposes](https://cloud
66
77Pipeline can be [ run manually] ( https://cloud.google.com/dataform/docs/code-lifecycle ) from the Dataform UI.
88
9- [ Configuration] ( ./tf /dataform.tf )
9+ [ Configuration] ( ./infra /dataform.tf )
1010
1111## Dataform Development Workspace
1212
You can’t perform that action at this time.
0 commit comments