Skip to content

Commit

Permalink
Works around limitation of actions/checkout.
Browse files Browse the repository at this point in the history
The checkout action disallows cloning a repo anywhere outside
GITHUB_WORKSPACE which, in linux, translates into
/home/runner/work/Mojee/Mojee.

If I just clone both repos in side by side:
/home/runner/work/Mojee/Mojee/mojee
/home/runner/work/Mojee/Mojee/mojee-dev

Then subsequent retype steps won't find 'retype.json' as they rely on
having the repo cloned at root.

If I just clone the private repo within the actual repo:
/home/runner/work/Mojee/Mojee (this repo)
/home/runner/work/Mojee/Mojee/mojee-dev (code repo)

Then, .md files within the code repo would also become documentation
articles in the produced page.

Thus, the solution found was just to clone it with an unique name and
move it with actual repo name to the desired location.

There's a feature request in the checkout action open at
actions/checkout#197.
  • Loading branch information
fabriciomurta committed Apr 29, 2021
1 parent 681635b commit 6e55974
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/retype.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ jobs:
with:
repository: fabriciomurta/mojee-dev
ssh-key: ${{ secrets.MOJEE_DEV_DEPLOY_KEY }}
path: ${{ github.workspace }}/../mojee-dev
path: mojee-dev-${{ github.run_id }}-${{ github.run_number }}

- name: move private repo to same level
shell: bash
run: mv mojee-dev-${{ github.run_id }}-${{ github.run_number }} ../mojee-dev

- uses: actions/setup-dotnet@v1
with:
Expand Down

0 comments on commit 6e55974

Please sign in to comment.