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

54 lines
1.3 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
2026-02-18 12:54:32 +01:00
paths:
- pve01.wheatley.in/k8s-wheatley/**
- .forgejo/workflows/tofu-plan-k8s-wheatley.yaml
2025-11-29 11:15:28 +01:00
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
2026-01-19 15:35:38 +01:00
defaults:
run:
2026-02-18 12:54:32 +01:00
working-directory: pve01.wheatley.in/k8s-wheatley
2026-01-19 15:35:38 +01:00
permissions:
pull-requests: write
2026-02-18 13:43:17 +01:00
env:
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_ENDPOINT: ${{ secrets.PROXMOX_ENDPOINT }}
TF_VAR_PROXMOX_API_TOKEN: ${{ secrets.PROXMOX_API_TOKEN }}
2025-11-28 15:34:52 +01:00
steps:
2026-02-18 12:47:52 +01:00
- uses: https://github.com/actions/checkout@v4
2026-02-18 12:48:52 +01:00
- uses: https://github.com/opentofu/setup-opentofu@v1
2026-02-18 12:43:31 +01:00
with:
tofu_version: 1.11.5
2026-02-18 13:38:12 +01:00
- name: debug
id: debug
run: |
2026-02-18 13:38:51 +01:00
env | cut -d= -f1 | sort
2026-02-18 13:38:12 +01:00
2026-02-18 12:43:31 +01:00
- name: OpenTofu Init
id: init
run: tofu init --upgrade
2025-11-29 12:15:12 +01:00
2025-11-28 15:34:52 +01:00
- name: OpenTofu fmt
id: fmt
run: tofu fmt -check
- name: OpenTofu Validate
id: validate
run: tofu validate -no-color
- name: OpenTofu Plan
id: plan
2026-01-19 15:35:38 +01:00
run: tofu plan -no-color
2025-11-28 15:34:52 +01:00
continue-on-error: true