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 repo mappings feature #113

Merged
merged 3 commits into from
Aug 18, 2021
Merged

Add repo mappings feature #113

merged 3 commits into from
Aug 18, 2021

Conversation

Yikun
Copy link
Owner

@Yikun Yikun commented Jul 27, 2021

Currently, hub mirror action didn't have availablilty to sync the repos with different name, such as the requirement like #45 #64, the user want to sync github xxx.github.com repo to gitee repo xxx.

This patch adds the support for mappings, actually, accurately, it's the source repo mappings. The repo name will do the mapping covert according the mappings.

The compelete demo looks like:

- name: mirror with mappings
  uses: Yikun/hub-mirror-action@mappings
  with:
    src: github/yikun
    dst: gitee/yikunkero
    dst_key: ${{ secrets.GITEE_PRIVATE_KEY }}
    dst_token: ${{ secrets.GITEE_TOKEN }}
    mappings: "yikun.github.com=>blog"
    static_list: "yikun.github.com"

It will sync the github.com/yikun/yikun.github.com to gitee.com/yikunkero/blog

Closes: #45
Closes: #64

@Yikun Yikun marked this pull request as ready for review July 27, 2021 14:28
hub-mirror/hubmirror.py Outdated Show resolved Hide resolved
@Yikun Yikun merged commit 33da6f9 into master Aug 18, 2021
@Yikun Yikun mentioned this pull request Aug 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants