How do we create parallel queues?
By understanding which Nx targets a pull request affects, we can build a real-time graph and detect intersection points and where distinct non-overlapping graphs exist. This information is essentially a list of unique target names, which can then be used in real time to understand along which targets pull requests might overlap. Calculating impacted targets in GitHub Actions
Trunk ships a GitHub action that will generate the list of impacted targets for a pull request and post that information to the Trunk Merge Queue service.
auth: github-actions logs the job in to Trunk with the run’s own GitHub credential through trunk-io/login, so there’s no Trunk secret to store, and the action uploads through the v2 API. On a public repository it also works on fork pull requests once an admin allows them. On a private repository, fork pull requests can upload only if you leave out auth (below). The login runs only on Linux (x64 or arm64) and macOS (arm64) runners; elsewhere, use a stored token.
To use a stored token instead, leave out auth and id-token: write, and pass trunk-token: ${{ secrets.TRUNK_API_TOKEN }}. Set that secret to your organization API token, from the Organization API token (v1) section of Settings → Developer → API Keys. This uploads through the v1 /setImpactedTargets endpoint, which will be deprecated soon; API keys don’t work. On a fork pull request, which gets no secrets by default, this mode uploads with the workflow run’s ID instead of the token. That works on private repositories too and needs no fork setting.