Refactor file paths in Terraform workflows

This commit is contained in:
2024-09-24 16:43:43 +02:00
parent 075447cd94
commit 49e15f441c
3 changed files with 153 additions and 9 deletions
@@ -0,0 +1,40 @@
name: Build and Release
on:
push:
branches:
- main
paths:
- "terraform/k8sapps/**"
jobs:
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
with:
version: 0.0.3
- name: Terraform Init
env:
VAULT_MASTER_PASSWORD: ${{ secrets.VAULT_MASTER_PASSWORD }}
run: |
cd terraform/k8sapps
sectool exec terraform init
- name: Terraform Apply
env:
VAULT_MASTER_PASSWORD: ${{ secrets.VAULT_MASTER_PASSWORD }}
run: |
cd terraform/k8sapps
sectool exec terraform apply --auto-approve