-
Notifications
You must be signed in to change notification settings - Fork 9
Trigger Architecture & Input Config
This setup uses a dispatcher workflow (ci-cd-dispatcher.yml) to trigger the actual CI/CD pipeline (ci-cd-pipeline.yml) using the GitHub CLI.
This allows for more flexible and modular pipelines without hitting GitHub’s workflow input limits.
GitHub Actions has two important limitations:
-
workflow_dispatchinputs are limited to 10 parameters -
workflow_callhas a limit of 20 total nested workflows
To avoid this, we:
- Use
ci-cd-dispatcher.ymlto prepare and group all parameters - Pass them to
ci-cd-pipeline.ymlviagh workflow runusing--fieldarguments - Unpack those JSON payloads using
jqinside the pipeline
Inputs are bundled into three structured --field JSON strings:
Contains core metadata for the build:
projectNamebuildTypebuildVersion-
skipTests,testsOnly
Controls how artifacts are handled:
requiresCombinedskipPerBuildTarget
Includes test/environment-specific info:
unityVersion-
editModePath,playModePath quietModeuseGitLfs
Values are a subject of change in shape and format, so it is strongly suggested to stick with using the ci-cd-dispatcher.yml unless you want to do custom logic. These values are unpacked into standard workflow outputs using a jq script block in the ci-cd-pipeline.yml file.
The dispatcher workflow (ci-cd-dispatcher.yml) is triggered by:
- ✅ Manual dispatch (
workflow_dispatch) - ✅ Pushes of version tags (
v1.2.3,v1.2.3-rc.1) - ✅ Pull requests targeting Unity-relevant folders
You can add push-triggered logic by adding specific branches which should trigger the pipeline to the dispatcher like so:
on:
push:
## branches:
## - '**' # all branches
tags:
- 'v[0-9]+.[0-9]+.[0-9]+' # e.g. v1.2.3
- 'v[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+' # e.g. v1.2.3-rc.1
paths:
- 'Assets/**'
- 'Packages/**'
- 'ProjectSettings/**'
- 'Tests/**'
pull_request:
types: [ready_for_review, synchronize, reopened]
paths:
- 'Assets/**'
- 'Packages/**'
- 'ProjectSettings/**'
- 'Tests/**'
workflow_dispatch:
inputs:
buildType:
description: Build type (preview / release_candidate / release)
type: choice
options: [preview, release_candidate, release]
required: true
default: preview
skipTests:
description: Whether to skip tests
type: choice
options: [default, true, false]
required: true
default: default
deployTargets:
description: JSON array of deploy targets
type: string
required: true
default: '["gh-pages"]'
buildTargets:
description: JSON array of build targets
type: string
required: true
default: '["WebGL"]'
buildVersion:
description: Optional version override
type: string
required: falseLet’s build better Unity pipelines together! 🚀
Need help? Join the Discussions or open an Issue.