Enhancement: Deploy Proxmox infra automatically on merge #51
@@ -3,6 +3,13 @@ name: Deploy Proxmox Infra
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- "01-proxmox-infra/**"
|
||||
- ".gitea/workflows/01-deploy-proxmox-infra.yaml"
|
||||
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
@@ -51,7 +58,7 @@ jobs:
|
||||
deploy:
|
||||
name: Pulumi Deploy
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name == 'workflow_dispatch'
|
||||
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
@@ -75,7 +82,10 @@ jobs:
|
||||
run: pulumi package add terraform-provider marshallford/pfsense 0.22.0
|
||||
working-directory: 01-proxmox-infra
|
||||
|
||||
# Manual runs only: a refresh that finds a VM missing drops it from state,
|
||||
# and `up` would then create a blank replacement without review.
|
||||
- name: Refresh State
|
||||
if: github.event_name == 'workflow_dispatch'
|
||||
run: |
|
||||
pulumi login "$PULUMI_BACKEND_URL"
|
||||
pulumi refresh --yes --stack dev \
|
||||
|
||||
Reference in new issue
Block a user