Skip to content

GitHub Actions expressions example is misleading #26381

@kbattocchi

Description

@kbattocchi

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/actions/learn-github-actions/expressions#example-of-literals

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

Unfortunately, everything in env is apparently converted to a string (see https://github.com/orgs/community/discussions/25645), though as far as I can tell this isn't documented anywhere (but it should be!).

This makes the section where literals of various types are being assigned to environment variables especially misleading - you can use those literal expressions in the env section, but the values that are actually stored are the converted strings, which may then break downstream logic that uses the values while expecting them to have the correct type. This is especially true of boolean values, since the string 'false' is truthy.

Additional information

No response

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 teamwaiting for reviewIssue/PR is waiting for a writer's review

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions