3 Star 0 Fork 0

mirrors_cocos-creator / repository-mirroring-action

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

README

A GitHub Action for mirroring a repository to another repository on GitHub, GitLab, BitBucket, AWS CodeCommit, etc.

This will copy all commits, branches and tags.

⚠️ Note that the other settings will not be copied. Please check which branch is 'default branch' after the first mirroring.

Usage

Customize following example workflow (namely replace <username>/<target_repository_name> with the right information) and save as .github/workflows/main.yml on your source repository.

To find out how to create and add the GITLAB_SSH_PRIVATE_KEY, follow the steps below:

  1. How to generate an SSH key pair. Recommended encryption would be at least 2048-bit RSA.
  2. Add the public key to your gitlab account
  3. Add the private key as a secret to your workflow. More information on creating and using secrets.
name: Mirroring

on: [push, delete]

jobs:
  to_gitlab:
    runs-on: ubuntu-18.04
    steps:                                              # <-- must use actions/checkout@v1 before mirroring!
    - uses: actions/checkout@v1
    - uses: pixta-dev/repository-mirroring-action@v1
      with:
        target_repo_url:
          git@gitlab.com:<username>/<target_repository_name>.git
        ssh_private_key:                                # <-- use 'secrets' to pass credential information.
          ${{ secrets.GITLAB_SSH_PRIVATE_KEY }}

  to_codecommit:                                        # <-- different jobs are executed in parallel.
    runs-on: ubuntu-18.04
    steps:
    - uses: actions/checkout@v1
    - uses: pixta-dev/repository-mirroring-action@v1
      with:
        target_repo_url:
          ssh://git-codecommit.<somewhere>.amazonaws.com/v1/repos/<target_repository_name>
        ssh_private_key:
          ${{ secrets.CODECOMMIT_SSH_PRIVATE_KEY }}
        ssh_username:                                   # <-- (for codecommit) you need to specify ssh-key-id as ssh username.
          ${{ secrets.CODECOMMIT_SSH_PRIVATE_KEY_ID }}
MIT License Copyright (c) 2019 PIXTA Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

暂无描述 展开 收起
Shell 等 2 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/mirrors_cocos-creator/repository-mirroring-action.git
git@gitee.com:mirrors_cocos-creator/repository-mirroring-action.git
mirrors_cocos-creator
repository-mirroring-action
repository-mirroring-action
master

搜索帮助