Skip to content

Commit

Permalink
Merge pull request #3 from csplink/dev
Browse files Browse the repository at this point in the history
只支持单纯的镜像,不再调用其他平台的 api 去创建仓库
  • Loading branch information
xqyjlj authored Jan 6, 2024
2 parents b5dffc4 + 53d31f2 commit ad2806e
Show file tree
Hide file tree
Showing 12 changed files with 259 additions and 607 deletions.
25 changes: 5 additions & 20 deletions .github/workflows/mirror.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,16 @@ name: 💕 mirror

on:
push:
branches:
- master
- dev

jobs:
mirror:
name: 💕 mirror to another location
runs-on: ubuntu-latest
steps:
- name: 💕 mirror to gitee
uses: csplink/action_git_mirror/@master
- name: 💕 mirror
uses: csplink/action_git_mirror/@dev
with:
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}
dest_token: ${{ secrets.GITEE_TOKEN }}
dest: gitee

- name: 💕 mirror to coding
uses: csplink/action_git_mirror/@master
with:
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}
dest_token: ${{ secrets.CODING_TOKEN }}
dest_repo: git@e.coding.net:csplink/csplink/action_git_mirror.git
dest: coding

- name: 💕 mirror to gitlab
uses: csplink/action_git_mirror/@master
with:
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}
dest_token: ${{ secrets.GITLAB_TOKEN }}
dest_repo: git@gitlab.com:csplink/action_git_mirror.git
dest: gitlab
14 changes: 0 additions & 14 deletions .github/workflows/release.yml

This file was deleted.

8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,11 @@
## v1.0.0

none

## v1.0.1

- Only supports simple mirroring and no longer calls APIs of other platforms to create repositories.

---

- 只支持单纯的镜像,不再调用其他平台的 api 去创建仓库
420 changes: 219 additions & 201 deletions LICENSE

Large diffs are not rendered by default.

6 changes: 1 addition & 5 deletions README-zh_CN.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
<div align="center">
<a href="https://csplink.top">
<img width="160" heigth="160" src="https://raw.githubusercontent.com/csplink/csp/master/Apps/CSP.Apps.Dev/Resources/Images/logo.svg" alt="logo" />
<img width="160" heigth="160" src="https://raw.githubusercontent.com/csplink/csp/master/apps/dev/resources/images/logo.svg" alt="logo" />
</a>
<h1>Action Git Mirror</h1>
<div>
<a href="https://github.com/csplink/action_git_mirror/actions?query=workflow%3A%F0%9F%92%95mirror">
<img src="https://img.shields.io/github/actions/workflow/status/csplink/action_git_mirror/mirror.yml?style=flat&label=mirror" alt="github-ci" />
</a>
<a href="https://github.com/csplink/action_git_mirror/actions?query=workflow%3A%F0%9F%94%96release">
<img src="https://img.shields.io/github/actions/workflow/status/csplink/action_git_mirror/release.yml?style=flat&label=release" alt="github-ci" />
</a>
</div>
<div>
<a href="https://github.com/csplink/action_git_mirror/releases">
Expand Down Expand Up @@ -48,5 +45,4 @@
## ✨ 特性

- 🚚 自动同步 GitHub 仓库
- 👷 自动创建 Gitee 仓库
- 🎹 支持多个同步平台
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
<div align="center">
<a href="https://csplink.top">
<img width="160" heigth="160" src="https://raw.githubusercontent.com/csplink/csp/master/Apps/CSP.Apps.Dev/Resources/Images/logo.svg" alt="logo" />
<img width="160" heigth="160" src="https://raw.githubusercontent.com/csplink/csp/master/apps/dev/resources/images/logo.svg" alt="logo" />
</a>
<h1>Action Git Mirror</h1>
<div>
<a href="https://github.com/csplink/action_git_mirror/actions?query=workflow%3A%F0%9F%92%95mirror">
<img src="https://img.shields.io/github/actions/workflow/status/csplink/action_git_mirror/mirror.yml?style=flat&label=mirror" alt="github-ci" />
</a>
<a href="https://github.com/csplink/action_git_mirror/actions?query=workflow%3A%F0%9F%94%96release">
<img src="https://img.shields.io/github/actions/workflow/status/csplink/action_git_mirror/release.yml?style=flat&label=release" alt="github-ci" />
</a>
</div>
<div>
<a href="https://github.com/csplink/action_git_mirror/releases">
Expand Down Expand Up @@ -48,5 +45,4 @@
## ✨ Features

- 🚚 Automatic synchronization of GitHub repository
- 👷 Automatic creation of Gitee repository
- 🎹 Support for multiple simultaneous platforms
24 changes: 3 additions & 21 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,13 @@ inputs:
ssh_private_key:
description: 'SSH private key'
required: true
dest_token:
description: 'dest location token'
required: true
dest:
description: 'dest location, E.g: gitee, coding'
required: true
src_repo:
description: 'SSH src repo'
repo:
description: 'SSH repo url'
required: true
default: ${{ github.event.repository.ssh_url }}
dest_repo:
description: 'SSH dest repo'
required: true
default: ""
is_user:
description: 'dest owner is user?, E.g: "False", "True"'
required: true
default: "False"
runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{ inputs.ssh_private_key }}
- ${{ inputs.dest_token }}
- ${{ inputs.dest }}
- ${{ inputs.src_repo }}
- ${{ inputs.dest_repo }}
- ${{ inputs.is_user }}
- ${{ inputs.repo }}
163 changes: 0 additions & 163 deletions coding.py

This file was deleted.

90 changes: 0 additions & 90 deletions gitee.py

This file was deleted.

Loading

0 comments on commit ad2806e

Please sign in to comment.