tofu workflow
Some checks failed
Test / tests (push) Has been cancelled
/ OpenTofu (push) Failing after 13s

This commit is contained in:
plasmagoat 2025-07-21 22:33:04 +02:00
parent 6972897c46
commit acc0dac234
26 changed files with 674 additions and 156 deletions

View file

@ -0,0 +1,44 @@
on:
push:
workflow_dispatch:
jobs:
apply:
name: OpenTofu
# Ensure 'nixos-latest' runner has Docker, SSH client, and basic Nix tools installed.
# It seems it already does.
runs-on: nixos-latest
env:
PROXMOX_API_URL: https://192.168.1.205:8006/api2/json
# PROXMOX_API_TOKEN_ID: nixos-builder.lab
# PROXMOX_API_TOKEN_SECRET: nixos-builder.lab
steps:
- name: Install dependencies
run: |
nix-env -iA nixpkgs.nodejs
nix-env -iA nixpkgs.openssh
nix-env -iA nixpkgs.opentofu
- uses: actions/checkout@v3
- name: OpenTofu fmt
id: fmt
run: tofu fmt -check
continue-on-error: true
- name: OpenTofu Init
id: init
run: tofu init
working-directory: /infrastructure/proxmox
- name: OpenTofu Validate
id: validate
run: tofu validate -no-color
working-directory: /infrastructure/proxmox
- name: OpenTofu Plan
id: plan
run: tofu plan -no-color
working-directory: /infrastructure/proxmox
continue-on-error: true