From 569df259ba08ac1d3c76390a7bf4146405cb32f5 Mon Sep 17 00:00:00 2001 From: Hongming Wang Date: Thu, 7 May 2026 02:38:20 -0700 Subject: [PATCH] fix(ci): align secret name to plumbed DISPATCH_TOKEN (closes #14) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The cascade workflow was reading from `secrets.TEMPLATE_DISPATCH_TOKEN` but the plumbed secret name is `DISPATCH_TOKEN` (verified just now via GET /repos/molecule-ai/molecule-core/actions/secrets — only DISPATCH_TOKEN is set). Without this rename the cascade would always evaluate "secret missing" and exit 1 on the next push to staging, defeating the entire point of grant-role-access.sh --apply that just landed. Three references updated: - env mapping (`secrets.X` → `secrets.DISPATCH_TOKEN`) - workflow_dispatch warning text - push-trigger error text The bash-side variable name is unchanged (still `DISPATCH_TOKEN`) so the curl invocation at line 372 is unaffected. YAML round-trip parses clean. --- .github/workflows/publish-runtime.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish-runtime.yml b/.github/workflows/publish-runtime.yml index 984ee0bb..47b2f9c8 100644 --- a/.github/workflows/publish-runtime.yml +++ b/.github/workflows/publish-runtime.yml @@ -287,7 +287,7 @@ jobs: # Fine-grained PAT with `actions:write` on the 8 template repos. # GITHUB_TOKEN can't fire dispatches across repos — needs an explicit # token. Stored as a repo secret; rotate per the standard schedule. - DISPATCH_TOKEN: ${{ secrets.TEMPLATE_DISPATCH_TOKEN }} + DISPATCH_TOKEN: ${{ secrets.DISPATCH_TOKEN }} # Single source of truth: the publish job's output, which handles # tag/manual-input/auto-bump uniformly. The previous fallback # (`steps.version.outputs.version` from inside the cascade job) @@ -313,11 +313,11 @@ jobs: # after fixing the secret) if [ -z "$DISPATCH_TOKEN" ]; then if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then - echo "::warning::TEMPLATE_DISPATCH_TOKEN secret not set — skipping cascade." + echo "::warning::DISPATCH_TOKEN secret not set — skipping cascade." echo "::warning::set it at Settings → Secrets and Variables → Actions, then rerun. Templates will stay on the prior runtime version until either this token is set or each template is rebuilt manually." exit 0 fi - echo "::error::TEMPLATE_DISPATCH_TOKEN secret missing — cascade cannot fan out." + echo "::error::DISPATCH_TOKEN secret missing — cascade cannot fan out." echo "::error::PyPI was published, but the 8 template repos will NOT pick up the new version until this token is restored and a republish dispatches the cascade." echo "::error::set it at Settings → Secrets and Variables → Actions; then re-trigger publish-runtime via workflow_dispatch." exit 1