Skip to content

fix(ci): Build JSON dispatch payload with jq in nightly-trigger workflow - #3746

Merged
kthoms merged 1 commit into
operaton:mainfrom
kthoms:fix/nightly-trigger-matrix-branch-expansion
Sep 27, 2026
Merged

kthoms merged 1 commit into
operaton:mainfrom
kthoms:fix/nightly-trigger-matrix-branch-expansion

Conversation

@kthoms

@kthoms kthoms commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • The MATRIX_BRANCH env var refactor in chore: Enable static pipeline analysis with zizmor #3538 left the ref field inside a single-quoted curl -d '{...}' payload in both dispatch steps of nightly-trigger.yml. Bash never expands variables inside single quotes, so the literal string ${MATRIX_BRANCH} was POSTed as the ref, GitHub rejected it, and every nightly build/integration-build dispatch has failed since 2026-08-26 (compare run 32805843151 vs 32927399014).
  • Replaced the hand-quoted JSON strings with jq -n --arg ref "$MATRIX_BRANCH" '{...}' in both the integration-build and build dispatch steps, so the branch name is safely interpolated and JSON-escaped.

Test plan

  • yamllint/jq sanity-checked the payload locally (MATRIX_BRANCH=... jq -n --arg ref "$MATRIX_BRANCH" '{...}' produces the expected JSON with the actual branch name).
  • Trigger nightly-trigger.yml manually (workflow_dispatch) after merge and confirm both dispatch steps report 204 / trigger the target workflows.

Co-Authored-By: Claude Sonnet 5 [email protected]

The MATRIX_BRANCH env var refactor (operaton#3538) left the ref field inside a
single-quoted curl -d payload, so bash never expanded it — the literal
string "${MATRIX_BRANCH}" was sent as the ref, causing every dispatch
call to fail with a non-204 response since 2026-08-26.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Copilot AI lite review requested due to automatic review settings September 27, 2026 13:41
@github-actions github-actions Bot added scope:ci Changes to the CI, e.g. GitHub workflows fix labels Sep 27, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The workflow payload construction fix is fully reviewed with no unresolved blocking issues.

Review effort: Lite
Findings: None

What changed in this PR

Fixes nightly workflow dispatch failures by safely constructing JSON payloads with jq and correctly interpolating MATRIX_BRANCH.

Changes:

  • Replaced hand-quoted payloads in both dispatch steps.
  • Added JSON-safe branch interpolation with jq --arg.
File Description
.github/​workflows/​nightly-trigger.yml Builds valid payloads for integration-build and build dispatches.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@kthoms
kthoms merged commit 96dbec2 into operaton:main Sep 27, 2026
5 checks passed
@kthoms kthoms added this to the 2.2.0 milestone Sep 27, 2026
@kthoms
kthoms deleted the fix/nightly-trigger-matrix-branch-expansion branch September 27, 2026 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix scope:ci Changes to the CI, e.g. GitHub workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants