Add deployment inputs and PR triggers to IAC workflows

This commit is contained in:
shenlan 2025-09-29 13:07:19 +08:00
parent cdce6d2922
commit d2dd201e61
3 changed files with 53 additions and 10 deletions

View File

@ -6,7 +6,28 @@ on:
- 'iac_modules/pulumi/**'
- 'config/alicloud/**'
- '.github/workflows/iac-pipeline-alicloud-landingzone-baseline.yaml'
pull_request:
branches: [main]
workflow_dispatch:
inputs:
deploy_action:
description: "Deployment action to execute"
type: choice
options:
- init
- magrate
- upgrade
- backup
- restore
- destroy
default: upgrade
deploy_dry_run:
description: "Run deployment steps in dry-run mode"
type: choice
options:
- 'true'
- 'false'
default: 'true'
env:
PULUMI_CI: 'true'

View File

@ -1,17 +1,27 @@
name: Deploy Infrastructure Monitor Exporters
on:
pull_request:
branches: [main]
workflow_dispatch:
branches:
- main
inputs:
deploy_action:
description: 'Deployment action to perform'
required: false
description: "Deployment action to execute"
type: choice
options:
- init
- magrate
- upgrade
- backup
- restore
- destroy
default: upgrade
deploy_dry_run:
description: 'Whether to perform a dry-run'
required: false
description: "Run deployment steps in dry-run mode"
type: choice
options:
- 'true'
- 'false'
default: 'true'
jobs:

View File

@ -4,13 +4,25 @@ on:
workflow_dispatch:
inputs:
deploy_action:
description: "Action to perform (upgrade, destroy, etc.)"
required: false
description: "Deployment action to execute"
type: choice
options:
- init
- magrate
- upgrade
- backup
- restore
- destroy
default: upgrade
deploy_dry_run:
description: "Run Ansible in check mode"
required: false
description: "Run deployment steps in dry-run mode"
type: choice
options:
- 'true'
- 'false'
default: 'true'
pull_request:
branches: [main]
push:
branches:
- main