Skip to content

Commit 60a0165

Browse files
committed
deduplicate
1 parent 10165f1 commit 60a0165

File tree

1 file changed

+5
-51
lines changed

1 file changed

+5
-51
lines changed

.github/workflows/dogfood.yaml

Lines changed: 5 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ jobs:
111111
workload_identity_provider: projects/573722524737/locations/global/workloadIdentityPools/github/providers/github
112112
service_account: coder-ci@coder-dogfood.iam.gserviceaccount.com
113113

114-
- name: Terraform init and validate
114+
- name: Terraform init and validate coder template
115115
run: |
116116
cd dogfood/coder
117117
terraform init -upgrade
@@ -120,54 +120,7 @@ jobs:
120120
terraform init -upgrade
121121
terraform validate
122122
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
171124
run: |
172125
cd dogfood/coder-envbuilder
173126
terraform init -upgrade
@@ -189,14 +142,15 @@ jobs:
189142
- name: "Push template"
190143
if: github.ref == 'refs/heads/main'
191144
run: |
192-
cd dogfood/coder-envbuilder
145+
cd dogfood/
193146
terraform apply -auto-approve
194147
env:
195148
# Consumed by coderd provider
196149
CODER_URL: https://dev.coder.com
197150
CODER_SESSION_TOKEN: ${{ secrets.CODER_SESSION_TOKEN }}
198151
# Template source & details
199-
TF_VAR_CODER_TEMPLATE_NAME: "${{ secrets.CODER_TEMPLATE_NAME }}-envbuilder"
152+
TF_VAR_CODER_TEMPLATE_NAME: ${{ secrets.CODER_TEMPLATE_NAME }}
200153
TF_VAR_CODER_TEMPLATE_VERSION: ${{ steps.vars.outputs.sha_short }}
154+
TF_VAR_CODER_TEMPLATE_DIR: ./contents
201155
TF_VAR_CODER_TEMPLATE_MESSAGE: ${{ steps.message.outputs.pr_title }}
202156
TF_LOG: info

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy