ci(gitea): deploy also on manual runs of main
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AqpXh3hQMMaC74pTjFq4it
This commit is contained in:
@@ -19,6 +19,10 @@ DEFAULTS = {"tests": "stubs", "has_js": False, "line_limit_paths": "includes",
|
||||
"enforce_300": True, "phpcs_autofix": True, "audit": True,
|
||||
"php_versions": ["8.1", "8.2", "8.3"], "extras": []}
|
||||
MAIN_PUSH = "github.event_name == 'push' && github.ref == 'refs/heads/main'"
|
||||
# Deploys also run on a manual (workflow_dispatch) run of main, so a failed or
|
||||
# drifted deploy can be redone without a dummy commit (deploy-health says so).
|
||||
MAIN_DEPLOY = ("(github.event_name == 'push' || github.event_name == 'workflow_dispatch')"
|
||||
" && github.ref == 'refs/heads/main'")
|
||||
|
||||
EXTRAS = {
|
||||
"check-constants": """
|
||||
@@ -200,7 +204,7 @@ jobs:
|
||||
deploy-staging:
|
||||
name: Deploy to staging
|
||||
needs: {needs}
|
||||
if: ${{{{ {MAIN_PUSH} }}}}
|
||||
if: ${{{{ {MAIN_DEPLOY} }}}}
|
||||
runs-on: peptide-vps
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@@ -225,7 +229,7 @@ jobs:
|
||||
# Smoke is a gate: production runs only if staging deploy AND smoke succeeded.
|
||||
# PROD_DEPLOY_ENABLED (org variable) is the cutover switch / kill switch.
|
||||
needs: [deploy-staging, smoke]
|
||||
if: ${{{{ vars.PROD_DEPLOY_ENABLED == 'true' && {MAIN_PUSH} }}}}
|
||||
if: ${{{{ vars.PROD_DEPLOY_ENABLED == 'true' && {MAIN_DEPLOY} }}}}
|
||||
runs-on: peptide-vps
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
Reference in New Issue
Block a user