Skip to content
This repository has been archived by the owner on Apr 30, 2023. It is now read-only.

Odd bahavior of ${GITHUB_WORKSPACE} #21

Open
doubledzei opened this issue Aug 24, 2020 · 2 comments
Open

Odd bahavior of ${GITHUB_WORKSPACE} #21

doubledzei opened this issue Aug 24, 2020 · 2 comments

Comments

@doubledzei
Copy link

Hello,

I've tried to deploy my test stack residing in subdir of my Github repository. Working_dir in yaml is set to point on that subdir.
Steps in yaml-file are still unable to cd to working_dir which seems to be /github/workspace/. I think there might be something odd with ${GITHUB_WORKSPACE}, which is used in entrypoint.sh. If I check ${GITHUB_WORKSPACE} from my yaml it points to /home/runner/work//reponame>/, not to /github/workspace/. What I've missed?

@doubledzei
Copy link
Author

Got that solved.
The new beta of of GitHub Actions will not automatically download repositor into the environment and set it at $GITHUB_WORKSPACE.

You can solve the issue with actions/checkout like:

  • name: set work space
    uses: actions/checkout@v2
    with:
    repository: '<path to owner/repository>'

@trevorhiley
Copy link

This fixed the issue for me. For anyone in the future, the repository property is optional and will default to the current repo if left empty which is presumably the expected behavior in most cases.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants