infrastructure/pve01.wheatley.in/k8s-wheatley/.forgejo/workflows/terraform-plan.yml

44 lines
865 B
YAML
Raw Normal View History

2025-10-26 11:42:08 +01:00
name: Tofu Plan
on:
pull_request:
branches: [ main ]
push:
branches-ignore:
- main
permissions:
contents: read
jobs:
tofu:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.9.8
- name: Terraform Format Check
run: terraform fmt -check -recursive
- name: Terraform Init
run: terraform init -backend=false
- name: Terraform Validate
run: terraform validate
- name: Terraform Plan
env:
TF_VAR_proxmox_endpoint: ${{ secrets.PROXMOX_ENDPOINT }}
TF_VAR_proxmox_api_token: ${{ secrets.PROXMOX_API_TOKEN }}
run: terraform plan -out=tfplan