Skip to content

Sync Repo to CODING

Actions
Sync Repository to CODING
v1.1
Latest
Star (8)

Sync Repo to CODING

本仓库是基于 x-dr/sync-repo-to-gitee 进行的修改。

用于将 GitHub 代码仓库同步到 CODING 代码仓库。

SSH 密钥配置

创建一个 SSH key , 将公钥id_rsa.pub保存到 Github SSH keys和 「CODING 个人账户——> SSH公钥」, 将私钥 id_rsa 在 GitHub 项目的 Settings -> Secrets 路径下配置好 CODING_PRIVATE_KEY

add-secret

workflow example

name: Sync Repo to CODING
on:
  push:
  schedule:
    # 每天北京时间0点同步
    - cron:  '0 16 * * *'

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - name: Sync Repo to CODING
      uses: serverlesslife-cn/sync-repo-to-coding@master
      env:
          # 在 GitHub Settings->Secrets 配置 CODING_PRIVATE_KEY
          SSH_PRIVATE_KEY: ${{ secrets.CODING_PRIVATE_KEY }}
      with:
          # 注意替换为你的 GitHub 源仓库地址
          github-repo: "git@github.com:serverlesslife-cn/sync-repo-to-coding.git"
          # 注意替换为你的 CODING 目标仓库地址
          coding-repo: "git@e.coding.net:donghui1/serverlesslife/sync-repo-to-coding.git"

Sync Repo to CODING is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Sync Repository to CODING
v1.1
Latest

Sync Repo to CODING is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.