-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
65 additions
and
95 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ jobs: | |
repo_list=$(gh repo list huayin-opensource -L 1000 --json name -t '{{range $i, $n := .}}{{if (gt $i 0)}},{{end}}{{$n.name}}{{end}}') | ||
echo "::set-output name=repo_list::${repo_list}" | ||
- name: Mirror Git | ||
- name: GitHub Org to Gitee Org | ||
uses: k8scat/[email protected] | ||
with: | ||
source_protocol: https | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ jobs: | |
repo_list=$(gh repo list k8scat -L 1000 --json name -t '{{range $i, $n := .}}{{if (gt $i 0)}},{{end}}{{$n.name}}{{end}}') | ||
echo "::set-output name=repo_list::${repo_list}" | ||
- name: Mirror Git | ||
- name: GitHub to BitBucket | ||
uses: k8scat/[email protected] | ||
with: | ||
source_protocol: https | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: GitHub to Gitee | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 2 * * 3" | ||
|
||
jobs: | ||
mirror: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Login Source GitHub | ||
run: | | ||
gh --version | ||
echo "${{ secrets.SOURCE_TOKEN }}" | gh auth login --with-token | ||
gh auth status | ||
- name: List repos | ||
id: list_repos | ||
run: | | ||
repo_list=$(gh repo list -L 1000 --json name -t '{{range $i, $n := .}}{{if (gt $i 0)}},{{end}}{{$n.name}}{{end}}') | ||
echo "::set-output name=repo_list::${repo_list}" | ||
- name: GitHub to Gitea | ||
uses: k8scat/[email protected] | ||
with: | ||
source_protocol: https | ||
source_host: github.com | ||
source_username: k8scat | ||
source_token: ${{ secrets.SOURCE_TOKEN }} | ||
dest_protocol: https | ||
dest_host: gitee.com | ||
dest_username: k8scat | ||
dest_token: ${{ secrets.DEST_TOKEN_GITEA }} | ||
push_tags: "true" | ||
mirror_repos: ${{ steps.list_repos.outputs.repo_list }} | ||
ignored_repos: "Gigrator" | ||
dest_create_repo_script: | | ||
curl \ | ||
-H 'Content-Type: application/json' \ | ||
-H "Authorization: token ${INPUT_DEST_TOKEN}" \ | ||
-d "{\"name\":\"test\",\"private\":true}" \ | ||
'https://gitea.com/api/v1/user/repos' | ||
dest_delete_repo_script: | | ||
curl \ | ||
-X DELETE \ | ||
-H "Authorization: token ${INPUT_DEST_TOKEN}" \ | ||
"https://gitea.com/api/v1/repos/${INPUT_DEST_USERNAME}/${REPO_NAME}" | ||
lark_webhook: ${{ secrets.LARK_WEBHOOK }} | ||
notify_prefix: "GitHub to Gitea" | ||
force_push: "true" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ jobs: | |
repo_list=$(gh repo list -L 1000 --json name -t '{{range $i, $n := .}}{{if (gt $i 0)}},{{end}}{{$n.name}}{{end}}') | ||
echo "::set-output name=repo_list::${repo_list}" | ||
- name: Mirror Git | ||
- name: GitHub to Gitee | ||
uses: k8scat/[email protected] | ||
with: | ||
source_protocol: https | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ jobs: | |
repo_list=$(gh repo list k8scat -L 1000 --json name -t '{{range $i, $n := .}}{{if (gt $i 0)}},{{end}}{{$n.name}}{{end}}') | ||
echo "::set-output name=repo_list::${repo_list}" | ||
- name: Mirror Git | ||
- name: GitHub to GitHub | ||
uses: k8scat/[email protected] | ||
with: | ||
source_protocol: https | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,7 @@ jobs: | |
repo_list=$(gh repo list -L 1000 --json name -t '{{range $i, $n := .}}{{if (gt $i 0)}},{{end}}{{$n.name}}{{end}}') | ||
echo "::set-output name=repo_list::${repo_list}" | ||
- name: Mirror Git | ||
- name: GitHub to GitLab | ||
uses: k8scat/[email protected] | ||
with: | ||
source_protocol: https | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM ghcr.io/gigrator/base:0.0.6 | ||
FROM ghcr.io/gigrator/base:0.0.7 | ||
LABEL maintainer="K8sCat <[email protected]>" | ||
LABEL repository="https://github.com/k8scat/action-mirror-git.git" | ||
COPY mirror.sh /mirror.sh | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters