forked from Yikun/hub-mirror-action
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
79 lines (79 loc) · 2.64 KB
/
action.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: "Hub Mirror Action."
description: "Mirror the organization repos between hub (github/gitee)."
author: "yikun"
branding:
icon: "upload-cloud"
color: "gray-dark"
inputs:
dst_key:
description: "The private SSH key which is used to to push code in destination hub."
required: true
dst_token:
description: "The app token which is used to create repo in destination hub."
required: true
dst:
description: "Destination name. Such as `gitee/kunpengcompute`."
required: true
src:
description: "Source name. Such as `github/kunpengcompute`."
required: true
account_type:
description: "The account type. Such as org, user."
default: 'user'
src_account_type:
description: "The src account type. Such as org, user."
default: ''
dst_account_type:
description: "The dst account type. Such as org, user."
default: ''
clone_style:
description: "The git clone style, https or ssh."
default: 'https'
cache_path:
description: "The path to cache the source repos code."
default: '/github/workspace/hub-mirror-cache'
black_list:
description: "Hight priority, the back list of mirror repo. like 'repo1,repo2,repo3'"
default: ''
white_list:
description: "Low priority, the white list of mirror repo. like 'repo1,repo2,repo3'"
default: ''
static_list:
description: "Only mirror repo in the static list, but don't get from repo api (the white/black list is still available). like 'repo1,repo2,repo3'"
default: ''
force_update:
description: "Force to update the destination repo, use '-f' flag do 'git push'"
default: false
force_clean:
description: "Force clean source repo finally"
default: false
debug:
description: "Enable the debug flag to show detail log"
default: false
timeout:
description: "Set the timeout for every git command, like '600'=>600s, '30m'=>30 mins, '1h'=>1 hours"
default: '30m'
mappings:
description: "The source repos mappings, such as 'A=>B, C=>CC', source repo name would be mapped follow the rule: A to B, C to CC. Mapping is not transitive."
default: ''
runs:
using: "docker"
image: "Dockerfile"
args:
- ${{ inputs.dst_key }}
- ${{ inputs.dst_token }}
- ${{ inputs.src }}
- ${{ inputs.dst }}
- ${{ inputs.account_type }}
- ${{ inputs.src_account_type }}
- ${{ inputs.dst_account_type }}
- ${{ inputs.clone_style }}
- ${{ inputs.cache_path }}
- ${{ inputs.black_list }}
- ${{ inputs.white_list }}
- ${{ inputs.static_list }}
- ${{ inputs.force_update}}
- ${{ inputs.force_clean}}
- ${{ inputs.debug}}
- ${{ inputs.timeout}}
- ${{ inputs.mappings}}