Improved workflows and actions
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
name: Terraform K8S Apps apply
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- "terraform/k8sapps/**"
|
||||
|
||||
jobs:
|
||||
terraform-apply:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Setup environment
|
||||
uses: ./.github/actions/setup-env
|
||||
|
||||
- name: Setup Ansible Environment
|
||||
uses: ./.github/actions/setup-ansible-env
|
||||
|
||||
- name: Setup Terraform Environment
|
||||
uses: ./.github/actions/setup-terraform-env
|
||||
|
||||
- name: Setup Kubernetes Environment
|
||||
uses: ./.github/actions/setup-k8s-env
|
||||
|
||||
- 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 }}
|
||||
ANSIBLE_USER: ${{ secrets.ANSIBLE_USER }}
|
||||
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
|
||||
run: |
|
||||
# Apply the Terraform configuration
|
||||
cd terraform/k8sapps
|
||||
sectool exec terraform apply --auto-approve
|
||||
Reference in New Issue
Block a user