Improved workflows and actions
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
name: Terraform IAC Validate on Pull Request
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- "terraform/iac/**"
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
- reopened
|
||||
jobs:
|
||||
terraform-validate:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Setup environment
|
||||
uses: ./.github/actions/setup-env
|
||||
|
||||
- name: Setup Terraform Environment
|
||||
uses: ./.github/actions/setup-terraform-env
|
||||
|
||||
- name: Terraform Init and Validate
|
||||
env:
|
||||
VAULT_MASTER_PASSWORD: ${{ secrets.VAULT_MASTER_PASSWORD }}
|
||||
run: |
|
||||
cd terraform/iac
|
||||
sectool exec terraform init
|
||||
terraform validate
|
||||
Reference in New Issue
Block a user