Skip to content
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

Add Git LFS Support #180

Merged
merged 7 commits into from
Jul 19, 2023
Merged

Add Git LFS Support #180

merged 7 commits into from
Jul 19, 2023

Conversation

kareemZarka
Copy link
Collaborator

@kareemZarka kareemZarka commented Jul 14, 2023

This pull request introduces support for Git LFS (Large File Storage)

  • Added the necessary steps to install Git LFS in the docker/entrypoint.
  • Updated the _clone and _update methods to fetch Git LFS objects during cloning and updating operations.
  • Modified the push method to push Git LFS objects along with regular repository content

Closes: #115

Signed-off-by: kareem zarka <kareem.zarka@huawei.com>
Copy link
Owner

@Yikun Yikun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contributions! Great work!

I think it's OK to me to support it, but I'd more like to introduce with a option parameter like lfs.

By default, lfs is set to false. Only enable the addition lfs fetch/push, when user set lfs to true.

You can also test it by using something like

- name: Git LFS support
  uses: kareemZarka/hub-mirror-action@support-lfs
  with:
    src: github/your_github_repo
    dst: gitee/your_gitee_repo
    dst_key: ${{ secrets.GITEE_PRIVATE_KEY }}
    dst_token: ${{ secrets.GITEE_TOKEN }}
    lfs: true

Pls also fix flake8 error and do a E2E test by above setting in your personal repo then paste the link.

Then I'd like to merge this.

thezarka added 3 commits July 17, 2023 23:35
In order to use it to enable LFS during mirror action.

Signed-off-by: kareem zarka <kareem.zarka@huawei.com>
Signed-off-by: kareem zarka <kareem.zarka@huawei.com>
Implemented Git LFS handling, this includes: Installing LFS during clone/update
operations, Pushing LFS objects during push operations.

Signed-off-by: kareem zarka <kareem.zarka@huawei.com>
Copy link
Owner

@Yikun Yikun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I added doc and example for lfs support.

If no more question, I will merge it today.

@kareemZarka
Copy link
Collaborator Author

@Yikun perfect! thank you!!

@Yikun Yikun merged commit 1d9c4ee into Yikun:master Jul 19, 2023
@Yikun
Copy link
Owner

Yikun commented Jul 19, 2023

@kareemZarka Thanks for contributions, merged.

You can use below steps to have a test, if no more issue, I'd like to release a new version: v1.4 .

- name: Mirror with lfs (git lfs fetch/push --all)
  uses: Yikun/hub-mirror-action@master
  with:
    // ... ..
    lfs: true

@Yikun
Copy link
Owner

Yikun commented Jan 6, 2024

@kareemZarka Any feedback about lfs feature?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

希望支持lfs同步
3 participants