Skip to content

Add GitHub Actions workflow #7

Add GitHub Actions workflow

Add GitHub Actions workflow #7

name: Terraform Staging Workflow
on:
push:
branches:
- "*"
concurrency:
group: merge-${{ github.ref }}
jobs:
terraform:
runs-on: ubuntu-latest
environment: Staging
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: 'google-github-actions/auth@v2'
with:
credentials_json: '${{ secrets.GOOGLE_CREDENTIALS }}'
- name: Set up Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.8.4
terraform_wrapper: false
- name: Terraform Init
run: terraform init
- name: Terraform Apply
run: terraform apply -auto-approve
env:
TF_VAR_region: "asia-southeast1"
TF_VAR_environment: "staging"
TF_VAR_telegram_bot_token: ${{ secrets.TELEGRAM_BOT_TOKEN }}