-
-
Notifications
You must be signed in to change notification settings - Fork 35
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
[Bug]: allow submodules #402
Comments
Hi! Thank you for your contribution!'Happy coding! 🚀 |
Hi @centifanto and thank you for the issue. As a fast workaround you could try the following: # Whether to checkout submodules: `true` to checkout submodules or `recursive` to
# recursively checkout submodules.
#
# When the `ssh-key` input is not provided, SSH URLs beginning with
# `[email protected]:` are converted to HTTPS.
#
# Default: false
submodules: '' So instead of doing the on:
# cronjob trigger
# schedule:
# - cron: "0 0 1 * *"
# manual trigger
workflow_dispatch:
jobs:
repo-sync:
runs-on: ubuntu-latest
steps:
# To use this repository's private action, you must check out the repository
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
# - name: remove submodule
# run: |
# rm -rf assets/lib
- name: actions-template-sync
uses: AndreasAugustin/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
source_repo_path: cotes2020/chirpy-starter
git_remote_pull_params: --allow-unrelated-histories --squash --strategy=recursive theoretically this should do the trick :) |
Thanks so much for your reply @AndreasAugustin! Haha that is funny, your solution is exactly what I found in my initial research and was thinking of trying! I was going to offer it as a potential workaround, but I thought it wouldn't work since your module would still fail upon seeing my local copy of this submodule (the first error I ran into). Either way, thank you. I will try it out and report back :) |
that worked, thank you @AndreasAugustin |
Perfect! Thx for the investigation @centifanto |
Is there an existing issue for this?
Describe the bug
This action is exactly what I was looking for, thank you. I am using a Jekyll template repo, and wanted to use your action to keep my repo up to date
However, this template has a submodule for some of it's static assets --> https://github.com/cotes2020/chirpy-starter/tree/main/assets
I ran into this error:
error: 'assets/lib' does not have a commit checked out
So I decided to just remove (with
rm -rf
) my repo's copy since it would be subsequently updated with the pull form remoteUpon removing, it seemed like solved the issue. But then this error popped up:
Could not access submodule 'assets/lib'
Expected Behavior
The action to allow pulling submodules from the remote
Current Behavior
It fails when trying to pull the submodule, either because it has
.git
information, or when removing it can't fetch that remote module.Steps To Reproduce
No response
Possible Solution
No response
Additional Information/Context
No response
Template sync version Version
1.1.3
The text was updated successfully, but these errors were encountered: