jobs:
handle_labels:
if: contains(github.event.label.name, 'build-for-integration')
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
with:
repository: ${{ 'private-org/github-actions' }}
token: ${{ secrets.GH_TOKEN }}
fetch-depth: 1
ref: 'v1'
path: ./github-actions
- name: Check local directory structure
run: |
cd github-actions
Results in:
/home/runner/work/_temp/{hash}.sh: line 1: cd: github-actions: No such file or directory
##[error]Process completed with exit code 1.
removing / adding ./ in various combination has no effect; in addition, providing the full workspace path / variable gives the dreaded "rooted path" error.
Running into a similar issue. The checkout steps seems to succeed, but the following steps cannot find the path where the repository were supposed to have been checked out.
It's because the workspace, aka the CWD of all subsequent steps, is changed automatically to the path given.
My intuition said that with.path would check out into a folder at the given location. No, instead it creates the folder and then _replaces_ the workspace folder with that new folder - wiping out anything you had in there before. Had to determine this empirically, and it's very frustrating as my build system requires a library to be downloaded in a folder that is a sibling of the checked out folder - and I wan to cache said library.
Has the functionality changed? In my build I check out the repo the yml is in and then clone a different repo which runs and then I guess just chucks it into nothingness because I am left with only the original repo after running an ls
actions/checkout@v1 path rules are a little bit complex:
github.workspace moves to follow wherever the repo gets checked outfoo, and checkout some other repo then it is placed on disk at ${{ github.workspace }}/../fooearly next week i'm planning to publish actions/checkout@v2 (PR) which will simplify the rules:
github.workspace@tsal i'm going to go ahead and close this issue (see path rules above). let me know if any remaining issue
fyi, master currently reflects v2-beta. try it out and let me know what you think. waiting for a little bit of feedback/stabilization period then will release v2 tag
published v2 tag
Most helpful comment
Running into a similar issue. The checkout steps seems to succeed, but the following steps cannot find the path where the repository were supposed to have been checked out.