Skip to content

Commit f8160d7

Browse files
committed
adds changelog for new default env vars in workers builds
1 parent 8e62a1d commit f8160d7

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
title: Default system environment variables in Workers Builds
3+
description: Workers Builds now injects default environment variables
4+
products:
5+
- workers
6+
date: 2025-06-10T01:00:00Z
7+
---
8+
9+
[Workers Builds](/workers/ci-cd/builds/) connects your Worker to a [Git repository](/workers/ci-cd/builds/git-integration/), and automates building and deploying your code on each pushed change.
10+
11+
To make CI/CD pipelines even more flexible, Workers Builds now automatically injects [default system environment variables](/workers/ci-cd/builds/configuration/#environment-variable) into your build process. You can use these variables to customize your build process based on the deployment context, such as the branch or commit.
12+
13+
The following system environment variables are injected by default:
14+
15+
| Environment Variable | Injected value | Example use-case |
16+
| ----------------------- | ------------------------------- | --------------------------------------------------------------------------------------- |
17+
| `CI` | `true` | Changing build behavior when run on CI versus locally |
18+
| `WORKERS_CI` | `1` | Changing build behavior when run on Workers Builds versus locally |
19+
| `WORKERS_CI_BUILD_UUID` | `<build-uuid-of-current-build>` | Passing the Build UUID along to custom workflows |
20+
| `WORKERS_CI_COMMIT_SHA` | `<sha1-hash-of-current-commit>` | Passing current commit ID to error reporting, for example, Sentry |
21+
| `WORKERS_CI_BRANCH` | `<branch-name-from-push-event` | Customizing build based on branch, for example, disabling debug logging on `production` |
22+
23+
You can override these default values and add your own custom environment variables by navigating to **your Worker** > **Settings** > **Environment variables**.
24+
25+
Learn more in the [Build configuration documentation](/workers/ci-cd/builds/configuration/#environment-variables).

0 commit comments

Comments
 (0)