-
Notifications
You must be signed in to change notification settings - Fork 2k
Checkout Specific Folder/Directory/Path within GitHub Repository #483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Having a similar use case, I noticed that there's a way to achieve that using |
There is this github action i found: https://github.com/marketplace/actions/checkout-files |
We are moving towards one repo per client which holds both their |
Isn't this supported since v3.5.3 by using |
Works like a dream 👍 |
Example with sparse checkout (would be nice if this was handled with a shortcut per #1430 ): jobs:
eas-preview:
name: EAS preview
runs-on: ubuntu-latest
steps:
# Checkout project code
# Use sparse checkout to only select files in mobile app directory
# Turning off cone mode ensures that files in the project root are not included during checkout
- uses: actions/checkout@v3
with:
sparse-checkout: 'frontend/mobile'
sparse-checkout-cone-mode: false
# This step is needed because expo-github-action does not support paths.
# Therefore all mobile app assets should be moved to the project root.
- name: Move mobile app files to root
run: |
ls -lah
shopt -s dotglob
mv frontend/mobile/* .
rm -rf frontend
ls -lah |
Were you able to find a cleaner way? @danial-k |
This is working for me
|
trying sparse checkout as in actions/checkout#483
👋
Let's say I have
repositoryA
that has a high-level folder structure of:I also have a repository called
repositoryB
. FromrepositoryB
, I am trying to checkoutrepositoryA
. I have that working by something like the below:This works and checks out the whole repository. I am looking for a way to only checkout the actions
directory from
repositoryA
, vs the whole repository. I was thinking something like this would work:This obviously isn't possible, but I wondered if there was another way around this?
The text was updated successfully, but these errors were encountered: