tofu workflow
This commit is contained in:
parent
6972897c46
commit
acc0dac234
26 changed files with 674 additions and 156 deletions
44
.forgejo/workflows/tofu.yml
Normal file
44
.forgejo/workflows/tofu.yml
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue