35 lines
No EOL
951 B
YAML
35 lines
No EOL
951 B
YAML
name: PVE2 Infrastructure Deploy
|
|
on:
|
|
push:
|
|
branches:
|
|
- main # Only deploy when we push to main
|
|
|
|
jobs:
|
|
terraform:
|
|
runs-on: pve2:host # This targets the runner we just installed
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Terraform Init
|
|
run: |
|
|
cd terraform
|
|
terraform init
|
|
|
|
- name: Terraform Plan
|
|
run: |
|
|
cd terraform
|
|
terraform plan
|
|
env:
|
|
PM_API_TOKEN_ID: ${{ secrets.PM_API_TOKEN_ID }}
|
|
PM_API_TOKEN_SECRET: ${{ secrets.PM_API_TOKEN_SECRET }}
|
|
PM_API_URL: "https://localhost:8006/api2/json"
|
|
|
|
- name: Terraform Apply
|
|
run: |
|
|
cd terraform
|
|
terraform apply -auto-approve
|
|
env:
|
|
PM_API_TOKEN_ID: ${{ secrets.PM_API_TOKEN_ID }}
|
|
PM_API_TOKEN_SECRET: ${{ secrets.PM_API_TOKEN_SECRET }}
|
|
PM_API_URL: "https://localhost:8006/api2/json" |