Skip to content

Working Directory with custom images #37027

@richseviora

Description

@richseviora

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/actions/writing-workflows/choosing-where-your-workflow-runs/running-jobs-in-a-container

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

When using a custom image, I've observed that GH Actions appears to be setting the container's work directory to its own custom directory. In my case it's __w/server/server. Therefore, any bash command I would've ran as-is successfully fails until I set the working-directory option to the correct value.

I don't know exactly how that value is being set, though it certainly appears to align with the volume paths captured here.

Additional information

I can confirm that setting the working-directory fixed my problem, but I don't know what's causing the issue and therefore what conditions it presents itself in.

Metadata

Metadata

Assignees

No one assigned

    Labels

    InactiveWill be closed automatically by a stall check if no activity is detected.contentThis issue or pull request belongs to the Docs Content teamneeds SMEThis proposal needs review from a subject matter expert

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions