@@ -111,7 +111,7 @@ jobs:
111
111
workload_identity_provider : projects/573722524737/locations/global/workloadIdentityPools/github/providers/github
112
112
service_account : coder-ci@coder-dogfood.iam.gserviceaccount.com
113
113
114
- - name : Terraform init and validate
114
+ - name : Terraform init and validate coder template
115
115
run : |
116
116
cd dogfood/coder
117
117
terraform init -upgrade
@@ -120,54 +120,7 @@ jobs:
120
120
terraform init -upgrade
121
121
terraform validate
122
122
123
- - name : Get short commit SHA
124
- if : github.ref == 'refs/heads/main'
125
- id : vars
126
- run : echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
127
-
128
- - name : Get latest commit title
129
- if : github.ref == 'refs/heads/main'
130
- id : message
131
- run : echo "pr_title=$(git log --format=%s -n 1 ${{ github.sha }})" >> $GITHUB_OUTPUT
132
-
133
- - name : " Push template"
134
- if : github.ref == 'refs/heads/main'
135
- run : |
136
- cd dogfood/coder
137
- terraform apply -auto-approve
138
- env :
139
- # Consumed by coderd provider
140
- CODER_URL : https://dev.coder.com
141
- CODER_SESSION_TOKEN : ${{ secrets.CODER_SESSION_TOKEN }}
142
- # Template source & details
143
- TF_VAR_CODER_TEMPLATE_NAME : ${{ secrets.CODER_TEMPLATE_NAME }}
144
- TF_VAR_CODER_TEMPLATE_VERSION : ${{ steps.vars.outputs.sha_short }}
145
- TF_VAR_CODER_TEMPLATE_DIR : ./contents
146
- TF_VAR_CODER_TEMPLATE_MESSAGE : ${{ steps.message.outputs.pr_title }}
147
- TF_LOG : info
148
-
149
- deploy_template_envbuilder :
150
- needs : build_image
151
- runs-on : ubuntu-latest
152
- steps :
153
- - name : Harden Runner
154
- uses : step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
155
- with :
156
- egress-policy : audit
157
-
158
- - name : Checkout
159
- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
160
-
161
- - name : Setup Terraform
162
- uses : ./.github/actions/setup-tf
163
-
164
- - name : Authenticate to Google Cloud
165
- uses : google-github-actions/auth@71f986410dfbc7added4569d411d040a91dc6935 # v2.1.8
166
- with :
167
- workload_identity_provider : projects/573722524737/locations/global/workloadIdentityPools/github/providers/github
168
- service_account : coder-ci@coder-dogfood.iam.gserviceaccount.com
169
-
170
- - name : Terraform init and validate
123
+ - name : Terraform init and validate coder-envbuilder template
171
124
run : |
172
125
cd dogfood/coder-envbuilder
173
126
terraform init -upgrade
@@ -189,14 +142,15 @@ jobs:
189
142
- name : " Push template"
190
143
if : github.ref == 'refs/heads/main'
191
144
run : |
192
- cd dogfood/coder-envbuilder
145
+ cd dogfood/
193
146
terraform apply -auto-approve
194
147
env :
195
148
# Consumed by coderd provider
196
149
CODER_URL : https://dev.coder.com
197
150
CODER_SESSION_TOKEN : ${{ secrets.CODER_SESSION_TOKEN }}
198
151
# Template source & details
199
- TF_VAR_CODER_TEMPLATE_NAME : " ${{ secrets.CODER_TEMPLATE_NAME }}-envbuilder "
152
+ TF_VAR_CODER_TEMPLATE_NAME : ${{ secrets.CODER_TEMPLATE_NAME }}
200
153
TF_VAR_CODER_TEMPLATE_VERSION : ${{ steps.vars.outputs.sha_short }}
154
+ TF_VAR_CODER_TEMPLATE_DIR : ./contents
201
155
TF_VAR_CODER_TEMPLATE_MESSAGE : ${{ steps.message.outputs.pr_title }}
202
156
TF_LOG : info
0 commit comments