Updated on 2024-12-16 GMT+08:00

env

Use env to define environment variables as key-value pairs. Environment variables can be referenced in any job within the pipeline.

Example

env:
  version: 1.0.0

You can use ${version} or ${{ env.version }} to reference the variable in any job.

${{ env.version }} is recommended, as shown in the example. For more information about the expression syntax, see Example 1: Using an Expression to Specify the Execution Condition.