Deploy Proxmox Infra / Pulumi Deploy (pull_request) Skipped
Deploy k8s Infra / Pulumi Deploy (pull_request) Skipped
Deploy k8s Apps / Pulumi Deploy (pull_request) Skipped
Deploy Monitoring / Pulumi Deploy (pull_request) Skipped
Deploy Proxmox Infra / Pulumi Preview (pull_request) Successful in 57s
Deploy k8s Infra / Pulumi Preview (pull_request) Successful in 43s
Deploy k8s Apps / Pulumi Preview (pull_request) Successful in 39s
Deploy Monitoring / Pulumi Preview (pull_request) Successful in 44s
Secret Scan / Betterleaks (pull_request) Successful in 6s
In local preview-only refreshes, the single-* targets reported no resources. The ** targets matched 15.
120 lines
3.5 KiB
YAML
120 lines
3.5 KiB
YAML
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
|
|
paths:
|
|
- "01-proxmox-infra/**"
|
|
- ".gitea/workflows/**"
|
|
|
|
jobs:
|
|
preview:
|
|
name: Pulumi Preview
|
|
runs-on: ubuntu-latest
|
|
if: github.event_name == 'pull_request'
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "24"
|
|
|
|
- name: Checkout Stack Config
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: kasun/homelab-pulumi-config
|
|
ref: main
|
|
token: ${{ secrets.PULUMI_CONFIG_REPO_TOKEN }}
|
|
path: .pulumi-config
|
|
persist-credentials: false
|
|
|
|
- name: Install Dependencies
|
|
run: npm ci
|
|
working-directory: 01-proxmox-infra
|
|
|
|
- name: Install Pulumi CLI
|
|
run: curl -fsSL https://get.pulumi.com | sh && echo "$HOME/.pulumi/bin" >> $GITHUB_PATH
|
|
|
|
- name: Generate Local pfSense SDK
|
|
run: pulumi package add terraform-provider marshallford/pfsense 0.22.0
|
|
working-directory: 01-proxmox-infra
|
|
|
|
- name: Preview
|
|
uses: pulumi/actions@v5
|
|
with:
|
|
command: preview
|
|
stack-name: dev
|
|
work-dir: 01-proxmox-infra
|
|
cloud-url: ${{ secrets.PULUMI_BACKEND_URL }}
|
|
env:
|
|
PULUMI_CONFIG_PASSPHRASE: ${{ secrets.PULUMI_CONFIG_PASSPHRASE }}
|
|
|
|
deploy:
|
|
name: Pulumi Deploy
|
|
runs-on: ubuntu-latest
|
|
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "24"
|
|
|
|
- name: Checkout Stack Config
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: kasun/homelab-pulumi-config
|
|
ref: main
|
|
token: ${{ secrets.PULUMI_CONFIG_REPO_TOKEN }}
|
|
path: .pulumi-config
|
|
persist-credentials: false
|
|
|
|
- name: Install Dependencies
|
|
run: npm ci
|
|
working-directory: 01-proxmox-infra
|
|
|
|
- name: Install Pulumi CLI
|
|
run: curl -fsSL https://get.pulumi.com | sh && echo "$HOME/.pulumi/bin" >> $GITHUB_PATH
|
|
|
|
- name: Generate Local pfSense SDK
|
|
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 \
|
|
--target 'urn:pulumi:dev::proxmox-infra::proxmoxve**' \
|
|
--target 'urn:pulumi:dev::proxmox-infra::tls**'
|
|
working-directory: 01-proxmox-infra
|
|
env:
|
|
PULUMI_CONFIG_PASSPHRASE: ${{ secrets.PULUMI_CONFIG_PASSPHRASE }}
|
|
PULUMI_BACKEND_URL: ${{ secrets.PULUMI_BACKEND_URL }}
|
|
|
|
- name: Deploy
|
|
uses: pulumi/actions@v5
|
|
with:
|
|
command: up
|
|
stack-name: dev
|
|
work-dir: 01-proxmox-infra
|
|
cloud-url: ${{ secrets.PULUMI_BACKEND_URL }}
|
|
env:
|
|
PULUMI_CONFIG_PASSPHRASE: ${{ secrets.PULUMI_CONFIG_PASSPHRASE }}
|