From 9b15ea5d330137880b595381e3f08af49413bdd9 Mon Sep 17 00:00:00 2001 From: kasun Date: Sun, 22 Nov 2026 18:42:30 +0100 Subject: [PATCH] enhancement(ci): deploy proxmox-infra on merge to main Skip the refresh on automatic deploys. A refresh that finds a VM missing drops it from state, and the following up would create a blank replacement. --- .gitea/workflows/01-deploy-proxmox-infra.yaml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/01-deploy-proxmox-infra.yaml b/.gitea/workflows/01-deploy-proxmox-infra.yaml index 9bc7c03..bb8dda8 100644 --- a/.gitea/workflows/01-deploy-proxmox-infra.yaml +++ b/.gitea/workflows/01-deploy-proxmox-infra.yaml @@ -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 \