The $GITHUB_ENV environment variable is used to set environment variables that persist across steps in a workflow job. By echoing FOO=bar into $GITHUB_ENV, the variable FOO will be available in subsequent steps within the same job. Variables set in GITHUB_ENV apply only to the current job. Example: echo "PR_NUMBER=$pr_number" >> $GITHUB_ENV Reference: https://github.com/orgs/community/discussions/56849