Skip to content

Dynamic CI: a complete GitHub Actions setup guide - #454

Merged
EliSchleifer merged 28 commits into
mainfrom
eli/dynamic-ci-github-actions-guide
Nov 4, 2026
Merged

EliSchleifer merged 28 commits into
mainfrom
eli/dynamic-ci-github-actions-guide

Conversation

@EliSchleifer

@EliSchleifer EliSchleifer commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Why

The GitHub Actions page showed how to add the filter job and one gated job. It did not tell anyone what goes wrong when a gate is miswired, and most of the ways a gate goes wrong are silent. Customers and their coding agents read this page, through llms.txt and llms-full.txt, to set up Dynamic CI, so it should be complete enough to copy from and check against.

The page is now built from what trunk2 runs on its own workflows (pr-ts.yaml, pr-rs-nix-tests.yaml, pr-tap-lint.yaml) and from the checks behind the Dynamic CI Issues tab (github-actions-parser's analyze_dynamic_ci).

What changed

  • A complete example workflow: a filter job, two gated jobs, a gated matrix job, and one summary job (ci-passed) to mark as the required check.
  • Five rules for every gated job, one per Issues-tab problem plus !cancelled():
    • Use the job key, not name:.
    • Re-export each gated job's output from the filter job.
    • List the filter job in needs.
    • Start the condition with !cancelled().
    • Compare with != 'false', and join other conditions with &&, never ||.
  • Keeping required checks working:
    • A skipped matrix job leaves per-entry required checks pending.
    • on.paths filters leave a workflow's required checks pending.
    • The summary job does not need the filter job, so a Trunk outage cannot fail the required check. This is the same shape as trunk2's conclusion and unit-tests-gate jobs.
  • Which events to filter: pull requests, both merge queue forms (trunk-merge/** and merge_group), pushes to the default branch, and forks.
  • A table of every action input, taken from the action's action.yaml.
  • A "Check your setup" section: the job log, enable-annotation, the Issues tab, then Learning mode before enforcement.
  • A longer frontmatter description. It is the line llms.txt shows for this page.

Choices worth a look

  • !cancelled() is now a rule, not just part of the example. The old example had it, but nothing said why. Without it, a failed filter job (a bad token, an outage) makes GitHub skip every gated job, so nothing is tested. This is the one mistake that fails closed instead of open.
  • The filter job is skipped on main. The engine treats a push to the default branch like a pull request (laneOf in trunk2's ts/packages/dynamic-ci/src/serving.ts). A customer who filters main can have jobs skipped after a merge. Skipping the filter job there leaves the outputs empty, so every gated job runs. I did not gate the jobs on github.ref instead, because a condition joined with || is exactly what the Issues tab flags as "never skips".
  • The page does not recommend dorny/paths-filter for the merge queue, although trunk2 uses it. That is our internal choice. Customers get the same result from path filters in Dynamic CI configuration, which is what the Merge queues page already describes.
  • The impacts accordion now says the signal is off until we turn it on. Before, it read as though sending the field changes verdicts.
  • No custom llms.txt. Mintlify builds llms.txt from page descriptions and has no per-section file. A checked-in one replaces the whole site's index, and that index then has to be kept up to date by hand. Putting the guidance on the page reaches llms-full.txt and the page's .md view as well.

Verification

  • actionlint passes on the example workflow.
  • I ran the example through trunk2's analyze_dynamic_ci, using a throwaway test. unit-tests, integration-tests and e2e all come out Gated with no problem, so a customer who copies it gets an empty Issues list.
  • Not yet checked: the rendered page in the preview deployment.

Not in this PR

  • The Force Run page's API section is still a placeholder.
  • The Buildkite page pins v0.1.5, but impacts needs v0.1.8.

🤖 Generated with Claude Code

Mintlify

76 threads from 1 user in Mintlify

Review in Mintlify

Rewrite the GitHub Actions setup page around the gating patterns trunk2
runs on its own workflows: a complete example, the rules every gated job
must follow, required checks, which events to filter, every action input,
and how to check the setup in the Issues tab.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mintlify

mintlify Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
trunk 🟢 Ready View Preview Nov 4, 2026, 5:38 PM

- Updated ci/dynamic-ci/getting-started/index.mdx

Mintlify-Source: dashboard-editor
- Updated ci/dynamic-ci/getting-started/index.mdx

Mintlify-Source: dashboard-editor
- Updated ci/dynamic-ci/getting-started/index.mdx

Mintlify-Source: dashboard-editor
- Updated ci/dynamic-ci/getting-started/index.mdx

Mintlify-Source: dashboard-editor
- Updated ci/dynamic-ci/getting-started/index.mdx

Mintlify-Source: dashboard-editor
- Updated ci/dynamic-ci/getting-started/index.mdx

Mintlify-Source: dashboard-editor
- Updated ci/dynamic-ci/getting-started/github-actions.mdx

Mintlify-Source: dashboard-editor
- Updated ci/dynamic-ci/getting-started/index.mdx
- Updated ci/dynamic-ci/getting-started/github-actions.mdx

Mintlify-Source: dashboard-editor
- Updated ci/dynamic-ci/getting-started/github-actions.mdx

Mintlify-Source: dashboard-editor
- Updated ci/dynamic-ci/getting-started/github-actions.mdx

Mintlify-Source: dashboard-editor
- Updated ci/dynamic-ci/getting-started/github-actions.mdx

Mintlify-Source: dashboard-editor
- Updated ci/dynamic-ci/getting-started/github-actions.mdx

Mintlify-Source: dashboard-editor
- Updated ci/dynamic-ci/getting-started/github-actions.mdx

Mintlify-Source: dashboard-editor
- Updated ci/dynamic-ci/getting-started/github-actions.mdx

Mintlify-Source: dashboard-editor
- Updated ci/dynamic-ci/getting-started/github-actions.mdx

Mintlify-Source: dashboard-editor
- Updated ci/dynamic-ci/getting-started/github-actions.mdx

Mintlify-Source: dashboard-editor
- Updated ci/dynamic-ci/getting-started/github-actions.mdx

Mintlify-Source: dashboard-editor
- Updated ci/dynamic-ci/getting-started/github-actions.mdx

Mintlify-Source: dashboard-editor
- Updated ci/dynamic-ci/getting-started/github-actions.mdx

Mintlify-Source: dashboard-editor
- Updated ci/dynamic-ci/getting-started/github-actions.mdx

Mintlify-Source: dashboard-editor
- Updated ci/dynamic-ci/getting-started/github-actions.mdx

Mintlify-Source: dashboard-editor
- Updated ci/dynamic-ci/getting-started/github-actions.mdx

Mintlify-Source: dashboard-editor
- Updated ci/dynamic-ci/getting-started/github-actions.mdx

Mintlify-Source: dashboard-editor
- Updated ci/dynamic-ci/getting-started/github-actions.mdx

Mintlify-Source: dashboard-editor
- Updated ci/dynamic-ci/getting-started/github-actions.mdx

Mintlify-Source: dashboard-editor
- Updated ci/dynamic-ci/getting-started/github-actions.mdx

Mintlify-Source: dashboard-editor
- Updated ci/dynamic-ci/getting-started/github-actions.mdx
- Updated ci/dynamic-ci/configuration.mdx
- Created ci/dynamic-ci/dynamic-ci-action-reference.mdx
- Updated docs.json

Mintlify-Source: dashboard-editor
@EliSchleifer
EliSchleifer merged commit cee2514 into main Nov 4, 2026
1 check passed
@EliSchleifer
EliSchleifer deleted the eli/dynamic-ci-github-actions-guide branch November 4, 2026 18:05

This branch was successfully deployed

1 active deployment
staging — 1ff60d86 Deployed Nov 4, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant