Skip to content

github.action_path suggests using cd ${{ ... }} which is against best practices #41779

@jsoref

Description

@jsoref

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/actions/reference/workflows-and-actions/contexts#github-context

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

Property name Type Description
github.action_path string The path where an action is located. This property is only supported in composite actions. You can use this path to access files located in the same repository as the action, for example by changing directories to the path: cd ${{ github.action_path }}.

Additional information

run: should not suggest ${{ ... }} as it's often dangerous, instead people should generally use:

env:
   something: ${{ ... }}
run:
   use "$something"

Metadata

Metadata

Assignees

No one assigned

    Labels

    contentThis issue or pull request belongs to the Docs Content teamtriageDo not begin working on this issue until triaged by the team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions