@@ -2,16 +2,16 @@ name: Terraform CI/CD
22
33on :
44 push :
5- branches : [' main' ]
5+ branches : [" main" ]
66 paths :
7- - ' infra/**'
8- - ' .github/workflows/terraform.yml'
7+ - " infra/**"
8+ - " .github/workflows/terraform.yml"
99 pull_request :
1010 types : [opened, synchronize, reopened]
11- branches : [' main' ]
11+ branches : [" main" ]
1212 paths :
13- - ' infra/**'
14- - ' .github/workflows/terraform.yml'
13+ - " infra/**"
14+ - " .github/workflows/terraform.yml"
1515
1616permissions :
1717 contents : read
3939 cancel-in-progress : false
4040
4141 steps :
42- - name : Checkout repository
42+ - name : Check out repository
4343 uses : actions/checkout@v5
4444
4545 - name : Set up Terraform
7878 fi
7979
8080 - name : Publish plan
81- uses : actions/upload-artifact@v4
81+ uses : actions/upload-artifact@v6
8282 with :
8383 name : tfplan-${{ github.run_id }}
8484 path : infra/tfplan
8787 id : build-summary
8888 run : |
8989 TF_PLAN=$(terraform -chdir=infra show -no-color tfplan)
90-
90+
9191 delimiter="$(openssl rand -hex 8)"
9292 echo "summary<<${delimiter}" >> $GITHUB_OUTPUT
9393 echo "## Terraform Plan" >> $GITHUB_OUTPUT
@@ -103,10 +103,10 @@ jobs:
103103 env :
104104 SUMMARY : ${{ steps.build-summary.outputs.summary }}
105105 run : echo "$SUMMARY" >> $GITHUB_STEP_SUMMARY
106-
106+
107107 - name : Push summary to PR
108108 if : github.event_name == 'pull_request'
109- uses : actions/github-script@v7
109+ uses : actions/github-script@v8
110110 env :
111111 SUMMARY : " ${{ steps.build-summary.outputs.summary }}"
112112 with :
@@ -132,7 +132,7 @@ jobs:
132132 cancel-in-progress : false
133133
134134 steps :
135- - name : Checkout repository
135+ - name : Check out repository
136136 uses : actions/checkout@v5
137137
138138 - name : Set up Terraform
@@ -151,7 +151,7 @@ jobs:
151151 run : terraform -chdir=infra init -input=false
152152
153153 - name : Download plan
154- uses : actions/download-artifact@v4
154+ uses : actions/download-artifact@v7
155155 with :
156156 name : tfplan-${{ github.run_id }}
157157 path : infra
0 commit comments