truss-directory points to a directory containing config.yaml. Chains are detected when truss-directory points to a .py file containing a @chains.mark_entrypoint class.
Pin to a specific release tag. Don’t use @main because the action API may change between releases.
Inputs
Path to a model directory containing
config.yaml, or a .py file for Chain deployments.Baseten API key. Store this as an encrypted secret. Never hardcode it in your workflow file.
Override the model or Chain name. For models, maps to
truss push --model-name (the Baseten CLI equivalent is baseten model push --override-name). For Chains, sets the chain_name. If empty, the action uses model_name from config.yaml for models. For Chains, it uses the configured Chain name, then falls back to the entrypoint class name.For models, publish to a specific environment. This input implies publish. For Chains in
v0.1.2, this input doesn’t promote the deployment. See regional-environment for Chain validation behavior. If empty, the action doesn’t select an environment.Set to
true when environment names a regional environment. The action sends validation requests to the regional endpoint. For Chains in v0.1.2, that endpoint calls the deployment already serving the environment, not the new deployment created by the action. Leave this input set to false to validate the new Chain deployment through its deployment-specific endpoint. Requires environment.Models only. JSON string of labels as key-value pairs, for example
{"team": "ml", "project": "llm"}. Attach metadata to track deployments in your CI pipeline.Models only. Name of the deployment. If empty, defaults to
PR-{number}_{sha} on pull requests or {sha} on direct pushes.Models only. Baseten team name. Set this input when the API key can access multiple teams and the action can’t select one interactively.
Deactivate the newly created deployment at the end of the run. Useful for PR checks where you deploy, validate with a predict request, and tear down. Set to
false when you want the deployment to remain active for manual inspection or when a model workflow deploys to an environment.The activate and deactivate calls this action makes are rate limited to 20 requests/minute per API key. See management API rate limits if you run high-volume CI.JSON override for the predict request payload. For models, if empty, the action reads
model_metadata.example_model_input from config.yaml. For Chains, provide the payload explicitly. The action skips prediction when the resolved JSON value is missing, null, false, 0, an empty string (""), an empty object ({}), or an empty array ([]).Maximum minutes to wait for the deployment to become active. The default (45 minutes) accommodates large model builds like TRT-LLM. Reduce this for smaller models to fail faster.
Outputs
For Chains, the configured Chain name. For models in
v0.1.2, this output is model_name from config.yaml, even when the model-name input overrides the deployed model name.Seconds spent waiting for the deployment to become active after the push call returns. This output doesn’t include time spent inside the push call, so it isn’t the total deployment or build duration.
Final status of the action run. One of:
success, deploy_failed, deploy_timeout, predict_failed, cleanup_failed.Status codes
Deployment naming
For models, the action generates deployment names from Git context unless you override withdeployment-name:
- Pull requests:
PR-{number}_{short_sha}(for example,PR-42_abc1234). - Direct pushes:
{short_sha}(for example,abc1234).
Permissions
The action requires onlycontents: read permission. No additional GitHub token permissions are needed.