You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Rules/action.yml

63 lines
2.0 KiB
YAML

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'
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
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'
runs:
using: "docker"
image: "Dockerfile"
args:
- ${{ inputs.dst_key }}
- ${{ inputs.dst_token }}
- ${{ inputs.src }}
- ${{ inputs.dst }}
- ${{ inputs.account_type }}
- ${{ inputs.clone_style }}
- ${{ inputs.cache_path }}
- ${{ inputs.black_list }}
- ${{ inputs.white_list }}
- ${{ inputs.static_list }}
- ${{ inputs.force_update}}
- ${{ inputs.debug}}