1f060541c3
Simplify playbook_microk8s.yml by removing duplicate lines and whitespace changes. Update ansible-apply.yaml to include a scheduled job for Terraform Apply.
42 lines
914 B
YAML
42 lines
914 B
YAML
name: Terraform Apply
|
|
|
|
on:
|
|
schedule:
|
|
- cron: "0 1 * * 0"
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- "terraform/iac/**"
|
|
- .github/workflows/terraform-iac-apply.yaml
|
|
|
|
jobs:
|
|
terraform-apply:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup Terraform
|
|
uses: hashicorp/setup-terraform@v1
|
|
with:
|
|
terraform_version: 1.9.6
|
|
|
|
- name: Setup Sectool
|
|
uses: a13labs/setup-sectool@v1
|
|
|
|
- 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
|