new deploy for gitea runner
This commit is contained in:
parent
f8a81ac223
commit
9f6560f8b6
1 changed files with 35 additions and 0 deletions
35
.gitea/workflows/deploy.yaml
Normal file
35
.gitea/workflows/deploy.yaml
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
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"
|
||||
Loading…
Reference in a new issue