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 plan
2+
3+ # TODO: only run when the contents of terraform/ have changed
4+ on :
5+ workflow_dispatch :
6+ pull_request :
7+
8+ environment :
9+ name : " dev"
10+
11+ # Federated Identity credentials
12+ permissions :
13+ id-token : write
14+ contents : read
15+
16+ jobs :
17+ terraform-plan :
18+ runs-on : ubuntu-latest
19+ defaults :
20+ run :
21+ working-directory : infra/terraform
22+
23+ steps :
24+ - name : Check out the repository
25+ uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
26+
27+ - name : Log in to azure using federated identity credentials
28+ uses : azure/login@532459ea530d8321f2fb9bb10d1e0bcf23869a43 # v3
29+ with :
30+ client-id : ${{ secrets.AZURE_SP_PR_CLIENT_ID }}
31+ tenant-id : ${{ secrets.AZURE_SP_TENANT_ID }}
32+ subscription-id : ${{ secrets.AZURE_SP_SUBSCRIPTION_ID }}
33+
34+ - name : Setup terraform
35+ uses : hashicorp/setup-terraform@dfe3c3f87815947d99a8997f908cb6525fc44e9e # v4
36+ with :
37+ terraform_version : 1.14.5
38+
39+ - name : Initialize terraform and select workspace
40+ run : terraform/init.sh dev
41+
42+ - name : Terraform Plan
43+ run : |
44+ cd terraform && \
45+ terraform plan \
46+ -var "CONTAINER_TAG=${{ github.sha }}" \
You can’t perform that action at this time.
0 commit comments