Skip to main content
Version: v4 (current)

API Reference

Configuration

You can specify input parameters via any of the following methods.

  • GitHub Action with See "Getting Started" examples.
  • Command Line You can specify input parameters via command line.
  • Environment Variables You can specify input parameters via environment variables.
  • Configuration Override Advanced Topics / Overrides

Modes

Cloud Runner can accept a parameter to run a specific mode, by default cli-build is run.

cli-build

runs a cloud runner build

list-resources

lists active resources

list-worfklow

lists running workflows

watch

follows logs of a running workflow

garbage-collect

runs garbage collection

- cache-push
- cache-pull

Cache commands to push and pull from the local caching directory. Used in cloud runner workflows. Uses cachePullFrom and cachePushTo parameters.

- hash (hash folder contents recursively)
- print-input (prints all input parameters)

Utility commands

- remote-cli-pre-build (sets up a repository, usually before a game-ci build)
- remote-cli-post-build (pushes to LFS and Library cache)

Commands called during cloud runner workflows before/after a build.

Common Parameters

Git syncronization parameters

gitPrivateToken (should be a GitHub access token with permission to get repositories)

Used to authenticate remote job's access to repository.

- GITHUB_REPOSITORY
- GITHUB_REF || branch || GitSHA

Used to syncronize the repository to the Cloud Runner job. If parameters are not provided, will attempt to read them from current directory's git repo (e.g branch, commit SHA, remote URL).

Cloud Runner parameters

providerStrategy

Specifies the Cloud Provider to use for Cloud Runner jobs. Accepted values: aws, k8s, local-docker.

- containerCpu
- containerMemory

Specifies the CPU and Memory resources to be used for cloud containers created by Cloud Runner. (See: getting started section for more configuration options per provider.)

cloudRunnerBranch

Specifies the release branch of Cloud Runner to use for remote containers. Accepted values: main (default), cloud-runner-preview (stable/development), cloud-runner-develop (latest/development)

Custom commands from files parameters

- containerHookFiles
- commandHookFiles
- commandHooks
- postBuildContainerHooks
- preBuildContainerHooks

Specifies the name of custom hook or step files to include in workflow. (Accepted Format: see "container hooks command hooks")

Custom commands from yaml parameters

customJob

Specifies a custom job to override default build workflow. (Accepted Format: see "advanced topics / custom job")

Configuration Override

inputPullCommand

Read parameter from command line ouput, such as a secret manager. Must include a {0} to inject the name of the parameter to pull. (See: Configuration Override)

pullInputList

List of parameters to apply with inputPullCommand. (See: Configuration Override)

Aws

awsStackName

Name of the persistent shared base stack, used to store artifacts and caching.

K8s

- kubeVolume
- kubeVolumeSize
- kubeStorageClass

Override name of persistent volume used, size of volume and storage class used.

Caching

cacheKey

Defaults to branch name. Defines the scope for sharing cache entries.

Utility

- cloudRunnerDebug (Debug logging for Cloud Runner)
- useLargePackages (Any packages in manifest.json containing phrase "LargePackage" will be
redirected to a shared folder for all builds sharing a cache key)
- useSharedBuilder (Use a shared clone of Game-CI, saves some storage space and can be used if
you're using one release branch of Cloud Runner)
- useCompressionStrategy (Use Lz4 compression for cache and build artifacts. Enabled by default)

Retained Workspace

- maxRetainedWorkspaces

See: Advanced Topics / Retained Workspaces, enables caching entire project folder.

Garbage Collection

- garbageMaxAge

Command Line Only Parameters

- populateOverride
- cachePushFrom
- cachePushTo
- artifactName
- select

Other Environment Variables

- USE_IL2CPP (Set to `false`)

External Links

All accepted parameters given here with a description: https://github.com/game-ci/unity-builder/blob/cloud-runner-develop/action.yml