Skip to main content

Action Runtime Information

When an action is running, it automatically prepares some environment variables and upstream helper steps to facilitate data exchange between the action and the platform.

Environment Variables

Define environment variables in an action for the program to read and use during runtime.

When defining environment variables, please avoid using the names preset by the platform to prevent unexpected errors in the program. The platform's preset environment variables are as follows:

Environment Variable NameValueDescription
COS_FILE_VOLUME/cos/filesMount directory for records
COS_CODE_VOLUME/cos/codesMount directory for code
COS_BIN_VOLUME/cos/binsMount directory for binary files
COS_BUNDLE_VOLUME/cos/bundlesMount directory for test programs in batch testing
COS_ARTIFACT_VOLUME/cos/artifactsArtifact directory for batch testing
COS_OUTPUT_VOLUME/cos/outputsOutput file directory for batch testing
COS_ORGIDORG UUIDORG ID
COS_USERIDUSER UUIDUSER ID
COS_WAREHOUSEIDWAREHOUSE UUIDWarehouse ID
COS_PROJECTPROJECT SLUGCurrent Action Running Project SLUG
COS_PROJECTIDPROJECT UUIDCurrent Action Running Project ID
COS_RECORDIDRECORD UUIDRecord ID
COS_ENDPOINTAPI URLcoScene API Endpoint
COS_TOKENCLI and API Token

Some of the above environment variables have empty values, which are optional. If they exist, their values are in UUID format; if not, they are empty.