chore: Add tofu workflows #1

Open
Peter wants to merge 25 commits from pgi-add-workflows into main
Showing only changes of commit 5d8d471dcd - Show all commits

View file

@ -1,5 +1,5 @@
--- ---
name: tofu plan name: tofu plan k8s-wheatley
on: on:
workflow_dispatch: workflow_dispatch:
workflow_call: workflow_call:
@ -10,12 +10,26 @@ on:
# - pve01.wheatley.in/k8s-whealtey/** # - pve01.wheatley.in/k8s-whealtey/**
jobs: jobs:
opentofu: tofu-plan-k8s-wheatley:
runs-on: docker runs-on: docker
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: opentofu/setup-opentofu@v1 - uses: opentofu/setup-opentofu@v1
- name: Setup Wireguard
run: |
echo "Installing Wireguard..."
sudo apt install resolvconf
sudo apt install wireguard
echo "Installing Wireguard ✅"
echo "Configuring Wireguard..."
echo "${{ secrets.WG_CONFIG }}" > /tmp/wg0.conf
sudo chmod 600 wg0.conf
echo "Configuring Wireguard ✅"
echo "Starting Wireguard..."
sudo wg-quick up /tmp/wg0.conf
echo "Started Wireguard ✅"
- name: OpenTofu fmt - name: OpenTofu fmt
id: fmt id: fmt
run: tofu fmt -check run: tofu fmt -check