Merge pull request #110 from svc-design/codex/fix-invalid-workflow-file-in-github-actions
Fix workflow deploy action conditions
This commit is contained in:
commit
b1553c04cd
@ -53,17 +53,17 @@ on:
|
||||
PULUMI_ACCESS_TOKEN:
|
||||
required: true
|
||||
|
||||
env:
|
||||
PULUMI_CI: 'true'
|
||||
CONFIG_PATH: ${{ inputs.config_path || github.event.inputs.config_path || 'config/vultr' }}
|
||||
DEPLOY_ACTION: ${{ inputs.deploy_action || github.event.inputs.deploy_action || 'upgrade' }}
|
||||
DEPLOY_DRY_RUN: ${{ inputs.deploy_dry_run || github.event.inputs.deploy_dry_run || 'true' }}
|
||||
|
||||
jobs:
|
||||
init:
|
||||
name: Initialize Vultr Pulumi stacks
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ env.DEPLOY_ACTION == 'init' }}
|
||||
env:
|
||||
PULUMI_CI: 'true'
|
||||
if: >-
|
||||
${{
|
||||
(github.event_name == 'workflow_dispatch' && github.event.inputs.deploy_action == 'init') ||
|
||||
(github.event_name == 'workflow_call' && inputs.deploy_action == 'init')
|
||||
}}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: pulumi/setup-pulumi@v3
|
||||
@ -80,8 +80,15 @@ jobs:
|
||||
|
||||
preview:
|
||||
name: Preview baseline changes
|
||||
if: ${{ env.DEPLOY_ACTION != 'init' }}
|
||||
if: >-
|
||||
${{
|
||||
(github.event_name == 'workflow_dispatch' && github.event.inputs.deploy_action != 'init') ||
|
||||
(github.event_name == 'workflow_call' && inputs.deploy_action != 'init') ||
|
||||
(github.event_name != 'workflow_dispatch' && github.event_name != 'workflow_call')
|
||||
}}
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
PULUMI_CI: 'true'
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
@ -104,8 +111,15 @@ jobs:
|
||||
apply:
|
||||
name: Apply to production stack
|
||||
needs: preview
|
||||
if: ${{ env.DEPLOY_ACTION != 'init' }}
|
||||
if: >-
|
||||
${{
|
||||
(github.event_name == 'workflow_dispatch' && github.event.inputs.deploy_action != 'init') ||
|
||||
(github.event_name == 'workflow_call' && inputs.deploy_action != 'init') ||
|
||||
(github.event_name != 'workflow_dispatch' && github.event_name != 'workflow_call')
|
||||
}}
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
PULUMI_CI: 'true'
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
|
||||
Loading…
Reference in New Issue
Block a user