Skip to main content
- uses: basetenlabs/action-truss-push@v0.1.0
  with:
    truss-directory: "./my-model"
    baseten-api-key: ${{ secrets.BASETEN_API_KEY }}
Deploys a Truss model to Baseten, waits for the deployment to become active, optionally validates it with a predict request, and cleans up or promotes the deployment. For workflow examples, see CI/CD. Pin to a specific release tag. Don’t use @main because the action API may change between releases.

Inputs

truss-directory
string
required
Path to the directory containing config.yaml, relative to the repository root.
baseten-api-key
string
required
Baseten API key. Store this as an encrypted secret. Never hardcode it in your workflow file.
promote
string
default:"false"
Promote the deployment to production after validation. Set to true for merge-to-main workflows where you want the new deployment to serve production traffic immediately.
cleanup
string
default:"true"
Deactivate the deployment after validation. Set to false when using promote: true or when you want the deployment to remain active for manual inspection.
predict-payload
string
default:""
JSON override for the predict request payload. If empty, the action reads model_metadata.example_model_input from config.yaml. If neither is set, the predict step is skipped entirely and the deployment isn’t validated.
deploy-timeout
string
default:"2700"
Maximum seconds to wait for the deployment to become active. The default (2700s / 45 minutes) accommodates large model builds like TRT-LLM. Reduce this for smaller models to fail faster.
predict-timeout
string
default:"300"
Timeout in seconds for the predict request.

Outputs

deployment-id
string
Baseten deployment ID. Use this to reference the deployment in downstream steps or API calls.
model-id
string
Baseten model ID.
model-name
string
Model name read from config.yaml.
deploy-time-seconds
string
Wall-clock seconds from push to active. Useful for tracking build performance over time.
predict-response
string
Response body from the predict call, truncated to 4 KB.
status
string
Final status of the action run. One of: success, deploy_failed, deploy_timeout, predict_failed, cleanup_failed.

Status codes

StatusDescription
successDeployment active, predict passed (if payload configured), cleanup completed.
deploy_failedtruss push or image build failed. Check config.yaml syntax and API key. Build logs appear in collapsible sections in the GitHub Actions output.
deploy_timeoutDeployment didn’t become active within deploy-timeout seconds. Increase the timeout for large models.
predict_failedPredict request returned an error or timed out. Verify the payload shape matches what the model expects.
cleanup_failedDeployment deactivation failed. The deployment may still be running. Deactivate it manually from the dashboard.

Deployment naming

The action generates deployment names from Git context:
  • Pull requests: PR-{number}_{short_sha} (for example, PR-42_abc1234).
  • Direct pushes: {short_sha} (for example, abc1234).

Permissions

The action requires only contents: read permission. No additional GitHub token permissions are needed.
permissions:
  contents: read