Files
a13labs.infra/.github/workflows/terraform-iac-apply.yml
T

41 lines
885 B
YAML

name: Terraform IAC Apply
on:
schedule:
- cron: "0 1 * * 0"
push:
branches:
- main
paths:
- "terraform/iac/**"
jobs:
terraform-apply:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup environment
uses: ./.github/actions/setup-env
- name: Setup Terraform Environment
uses: ./.github/actions/setup-terraform-env
- name: Terraform Init
env:
VAULT_MASTER_PASSWORD: ${{ secrets.VAULT_MASTER_PASSWORD }}
run: |
cd terraform/iac
sectool exec terraform init
- name: Terraform Apply
env:
VAULT_MASTER_PASSWORD: ${{ secrets.VAULT_MASTER_PASSWORD }}
run: |
cd terraform/iac
sectool exec terraform apply --auto-approve