infrastructure/.forgejo/workflows/tofu-plan-k8s-wheatley.yaml

49 lines
1.2 KiB
YAML
Raw Normal View History

2025-11-28 15:34:52 +01:00
---
2025-11-28 20:53:52 +01:00
name: tofu plan k8s-wheatley
2025-11-28 15:34:52 +01:00
on:
workflow_dispatch:
workflow_call:
pull_request:
branches:
- main
# paths:
2025-11-29 11:15:28 +01:00
# - pve01.wheatley.in/k8s-wheatley/**
env:
TOFU_DIR: pve01.wheatley.in/k8s-wheatley
2025-11-29 11:22:33 +01:00
AWS_S3_ENDPOINT: ${{ secrets.AWS_S3_ENDPOINT }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
TF_VAR_PROXMOX_API_TOKEN: ${{ secrets.PROXMOX_API_TOKEN }}
TF_VAR_PROXMOX_ENDPOINT: ${{ secrets.PROXMOX_ENDPOINT }}
2025-11-28 15:34:52 +01:00
jobs:
2025-11-28 20:53:52 +01:00
tofu-plan-k8s-wheatley:
2025-11-28 15:34:52 +01:00
runs-on: docker
2025-11-29 11:47:07 +01:00
container:
image: ghcr.io/opentofu/opentofu:1.10.7
2025-11-28 15:34:52 +01:00
steps:
- uses: actions/checkout@v4
- name: OpenTofu fmt
id: fmt
run: tofu fmt -check
2025-11-29 11:15:28 +01:00
working-directory: ${{ env.TOFU_DIR }}
2025-11-28 15:34:52 +01:00
continue-on-error: true
- name: OpenTofu Init
id: init
run: tofu init
2025-11-29 11:15:28 +01:00
working-directory: ${{ env.TOFU_DIR }}
2025-11-28 15:34:52 +01:00
- name: OpenTofu Validate
id: validate
run: tofu validate -no-color
2025-11-29 11:15:28 +01:00
working-directory: ${{ env.TOFU_DIR }}
2025-11-28 15:34:52 +01:00
- name: OpenTofu Plan
id: plan
run: tofu plan -no-color
2025-11-29 11:15:28 +01:00
working-directory: ${{ env.TOFU_DIR }}
2025-11-28 15:34:52 +01:00
continue-on-error: true