-
Notifications
You must be signed in to change notification settings - Fork 10
35 lines (31 loc) · 1.07 KB
/
example.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Mirror Git
on:
workflow_dispatch:
jobs:
mirror-main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: List repos
id: list_repos
run: |
echo "::set-output name=repo_list::repo1,repo2"
- name: action-git-mirror
uses: k8scat/[email protected]
with:
source_protocol: https
source_host: github.com
source_username: ${{ secrets.SOURCE_USERNAME }}
source_token: ${{ secrets.SOURCE_TOKEN }}
dest_protocol: ssh
dest_host: github.com
dest_username: ${{ secrets.DEST_USERNAME }}
dest_private_key: ${{ secrets.DEST_PRIVATE_KEY }}
enable_git_lfs: "true"
push_tags: "true"
dest_create_repo_script: |
# create repo via github cli
echo "${dest_token}" > ~/.github_token
gh auth login --with-token < ~/.github_token
gh repo create "${DEST_USERNAME}/${REPO_NAME}" --private -y
mirror_repo_list: ${{ steps.list_repos.outputs.repo_list }}