chore(dogfood): use remote tf state (#14363)

This commit is contained in:
Ethan
2024-08-21 12:46:28 +10:00
committed by GitHub
parent b6d35edebd
commit d9f419308a
2 changed files with 15 additions and 2 deletions
+12 -1
View File
@@ -17,6 +17,10 @@ on:
- "flake.nix"
workflow_dispatch:
permissions:
# Necessary for GCP authentication (https://github.com/google-github-actions/setup-gcloud#usage)
id-token: write
jobs:
build_image:
if: github.actor != 'dependabot[bot]' # Skip Dependabot PRs
@@ -85,6 +89,12 @@ jobs:
- name: Setup Terraform
uses: ./.github/actions/setup-tf
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v2
with:
workload_identity_provider: projects/573722524737/locations/global/workloadIdentityPools/github/providers/github
service_account: coder-ci@coder-dogfood.iam.gserviceaccount.com
- name: Terraform init and validate
run: |
cd dogfood
@@ -110,7 +120,7 @@ jobs:
cd dogfood
terraform apply -auto-approve
env:
# Consumed by Coder CLI
# Consumed by coderd provider
CODER_URL: https://dev.coder.com
CODER_SESSION_TOKEN: ${{ secrets.CODER_SESSION_TOKEN }}
# Template source & details
@@ -118,3 +128,4 @@ jobs:
TF_VAR_CODER_TEMPLATE_VERSION: ${{ steps.vars.outputs.sha_short }}
TF_VAR_CODER_TEMPLATE_DIR: ./contents
TF_VAR_CODER_TEMPLATE_MESSAGE: ${{ steps.message.outputs.pr_title }}
TF_LOG: info