fix(ci): publish-runtime-autobump bump-and-tag condition is always-skipped
Some checks failed
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 18s
Lint curl status-code capture / Scan workflows for curl status-capture pollution (pull_request) Successful in 17s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 19s
gate-check-v3 / gate-check (pull_request) Successful in 30s
qa-review / approved (pull_request) Failing after 24s
E2E API Smoke Test / detect-changes (pull_request) Successful in 1m10s
CI / Detect changes (pull_request) Successful in 1m14s
security-review / approved (pull_request) Failing after 16s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 1m14s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 1m13s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 1m4s
sop-tier-check / tier-check (pull_request) Successful in 23s
CI / Platform (Go) (pull_request) Successful in 10s
CI / Canvas (Next.js) (pull_request) Successful in 10s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 7s
CI / Python Lint & Test (pull_request) Successful in 8s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 11s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 9s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 12s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 9s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
CI / all-required (pull_request) Successful in 4s
audit-force-merge / audit (pull_request) Successful in 17s

`if: github.event.pull_request.base.ref == ''` was meant to gate
bump-and-tag to push events (not pull_request events which route to
pr-validate).  However, on a PR-merge push in Gitea Actions, the
pull_request context is still attached with base.ref='main', so the
condition always evaluated to false and bump-and-tag was permanently
skipped.

Fix: replace with `if: github.event_name == 'push'` which correctly
fires only on branch pushes after the PR is merged.

Also add `workflow_dispatch` trigger so the workflow can be manually
dispatched when the Gitea Actions API (/actions/*) is unreachable
(act_runner 404 on Gitea 1.22.6 — internal#327).

Closes internal#327.
This commit is contained in:
Molecule AI · infra-runtime-be 2026-05-11 20:34:54 +00:00
parent d53b7fecc0
commit 8a7ca8ed33

View File

@ -36,6 +36,10 @@ on:
- staging
paths:
- "workspace/**"
# Manual dispatch — useful when Gitea Actions API (/actions/*) is
# unreachable (e.g. act_runner 404 on Gitea 1.22.6) and we cannot
# re-trigger via curl.
workflow_dispatch:
permissions:
contents: write # required to push tags back
@ -76,9 +80,15 @@ jobs:
# watchdog, which is the desired signal for infrastructure degradation.
bump-and-tag:
runs-on: ubuntu-latest
# This job only fires on main/staging pushes (not on PR events) because
# the pull_request trigger above routes to pr-validate instead.
if: github.event.pull_request.base.ref == ''
# Only fire on push events (main/staging after PR merge). Pull_request
# events are handled by pr-validate above; we do NOT bump on every
# push-synchronize because that would race with the PR head.
#
# NOTE: the prior condition `github.event.pull_request.base.ref == ''`
# was broken — on a PR-merge push in Gitea Actions, the pull_request
# context is still attached (base.ref='main'), so the condition always
# evaluated to false and bump-and-tag was permanently skipped.
if: github.event_name == 'push'
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with: