I have github actions in repo knowyrtech/repo1 where I check-out knowyrtech/repo2 like below:
- name: Checkout code from a specific repository and branch
uses: actions/checkout@v3
with:
repository: knowyrtech/repo2 # Replace with the repository you want to checkout
ref: release/valtech
I wish to get to the directory on the windows github runner where repo2 was checked out.
I used ${{ github.workspace }} but it takes me to the <runner work directory>/repo1/repo1 whereas I see that repo2's checkout folder may be here <runner work directory>/repo1/repo2.
Can you please suggest how can I get inside the folder where remote repo2 was checked out?
Since you are using multiple repositories within your runner (
repo1/repo1andrepo1/repo2), you can use thepathoption fromactions/checkout.This way you shall have the main repo under
repo1and second repo underrepo2.