Skip to content

Build docker images with terraform. (#77) #22

Build docker images with terraform. (#77)

Build docker images with terraform. (#77) #22

Workflow file for this run

name: CD Infra
on:
push:
paths:
- infra/**
- .github/workflows/cd.infra.yaml
branches:
- main
env:
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GCP_CD }}
PROJECT: "artist-2d"
DEPLOY_ENV: "dev"
defaults:
run:
working-directory: infra/app
jobs:
tf_app:
name: "Terraform App"
runs-on: "ubuntu-latest"
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v2
with:
credentials_json: '${{ secrets.GCP_CD }}'
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v2
with:
version: '>= 363.0.0'
- uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.4
terraform_wrapper: false
- name: Init Terraform
run: |
terraform init
terraform refresh
- name: Update Infra
run: |
terraform plan -no-color
terraform apply -no-color -auto-approve