youyo / aws-cdk-github-actions

MIT License
207 stars 101 forks source link

Odd bahavior of ${GITHUB_WORKSPACE} #21

Open doubledzei opened 4 years ago

doubledzei commented 4 years ago

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 commented 4 years ago

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:

trevorhiley commented 3 years ago

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.