Skip to content

How to properly escape values for $GITHUB_ENV file #10788

@klinki

Description

@klinki

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/actions/learn-github-actions/workflow-commands-for-github-actions#environment-files

What part(s) of the article would you like to see updated?

I'm missing explanation how to properly escape values written to $GITHUB_ENV file. It would be also helpful to describe how this file is read.

Additional information

I'm writing this issue based on my current experience.

I'm trying to set environment variable with value which starts with $ and so far I haven't been able to do so.
Please see following workflow file as example: https://github.com/klinki/github-actions-for-packages/blob/main/.github/workflows/test-env-vars.yml


Edited by maintainer

Content Plan

Here is the writer's content plant for this issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    actionsThis issue or pull request should be reviewed by the docs actions teamcontentThis issue or pull request belongs to the Docs Content teamgood first issueGood for newcomershelp wantedAnyone is welcome to open a pull request to fix this issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions