Closed azriel91 closed 1 year ago
Hi, you should be able to do this at the action level. Either via the actions/checkout
or via the working-directory
option (https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_iddefaultsrun)
ah, I tried using working-directory
first, but that configuration parameter only works when using run
(shell action) instead of uses: <some action>
.
Someone else also hit this (stack overflow comment), and it seems it has to be supported by the action
We already have the BUILD_DIR
option for that.
Maybe you want to push up the cd $BUILD_DIR
command so that the git repo is also in the same dir. I don't know though if it would have unintended side effects.
ah yes, it was the submodule update that failed in my github action.
There shouldn't be any other side effects, the previous commands are:
git config --global ..
which are all not sensitive to working-directory.
Shall open another PR -- after confirming submodule updates work when run from a sub-directory.
Heya, I have a workflow that clones the website repository into a subdirectory (it clones a number of repositories).
That workflow needs this action to switch to the sub directory before continuing.