Prerequisites
- An app template with a branch configured and synced. See the app branches guide for details.
- Org admin access, to create the trust policy or API token the workflow authenticates with. See Authentication.
Trigger a branch run from your workflow
Configure a job step to use the Nuon CLI action. The example authenticates with OIDC, so the job needs theid-token: write permission; the CLI detects that it’s running in GitHub Actions and performs the token exchange automatically.
.github/workflows/rollout.yaml
--no-wait will tell the CLI to return as soon as the App Branch run has been successfully created, allowing the GitHub Actions workflow to complete. Depending on how your App Branch is configured, there may still be manual approvals required in the workflows that are triggered.Trigger a specific tag, commit, or pull request
actions-nuon also ships one action per run type. Each wraps nuon branches trigger --run-type:
For example, roll out each GitHub release once your own release workflow publishes it:
.github/workflows/nuon-release.yaml
repo:acme/app:ref:refs/tags/<tag>), so the trust
policy needs a sub condition that matches tag refs as well as main. See claim matching.
Trigger actions take tag, sha, or pr_number. Preview actions take pr_number or git_ref, plus an optional mode
(plan-only, apply, build-only). See the actions-nuon README for every input.
Variations
For a preview run (not a fleet rollout through install groups), usebranches preview — for example against a
committed ref or PR number:
--force on branches trigger rebuilds every component instead of only what changed since the previous run:
Further usage
Thecommand input takes any CLI command, so the same action covers whatever else your pipeline needs — for example, syncing install config files from your repo:
Action inputs
For a self-hosted control plane, pass its API URL as the
api_url input and use the same URL as the trust policy
audience. If the two must differ, set oidc_audience to match the policy.Authentication
The action authenticates with OIDC or with a static API token.Using OIDC
We strongly recommend configuring GitHub Actions to authenticate with Nuon using OIDC, so no long-lived API tokens need to be stored in GitHub. Create a trust policy for the repository and its protected branch on the Manage OIDC page in the Dashboard. Select the repo you want to trust and the form will be filled out for you. You can also use the CLI.sub condition limited to a protected branch and the --ttl short. The exchanged token only needs to
outlive the one command it runs. See claim matching for other supported
patterns.
Triggering an App Branch run currently requires
org_admin permissions.
We are in the process of adding more roles so such broad permissions are not required.Using static API tokens
If you can’t use OIDC — for example, your organization disallows theid-token: write permission — you can
authenticate using a long-lived API token.
Create the token and save it in a GitHub Actions secret named NUON_API_TOKEN.
id-token: write permission is not required if you are using a token.
When using static tokens, we strongly recommend rotating them as frequently as is practical.
Next steps
Configure app branches
Write the branch config, group your installs, and approve rollouts.
How app branches work
Run types, plan and approval flow, and install version history.
OIDC federation
Trust policies, claim matching, and other CI providers.
Webhooks
React to branch run events from your own systems.