git
git
This commit is contained in:
@@ -0,0 +1,38 @@
|
|||||||
|
# 通过 Github actions, 在 Github 仓库的每一次 commit 后自动同步到 Gitee 上
|
||||||
|
name: sync2gitee
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
jobs:
|
||||||
|
repo-sync:
|
||||||
|
env:
|
||||||
|
dst_key: ${{ secrets.GITEE_PRIVATE_KEY }}
|
||||||
|
dst_token: ${{ secrets.GITEE_TOKEN }}
|
||||||
|
gitee_user: ${{ secrets.GITEE_USER }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
|
- name: sync github -> gitee
|
||||||
|
uses: Yikun/hub-mirror-action@master
|
||||||
|
if: env.dst_key && env.dst_token && env.gitee_user
|
||||||
|
with:
|
||||||
|
# 必选,需要同步的 Github 用户(源)
|
||||||
|
src: 'github/${{ github.repository_owner }}'
|
||||||
|
# 必选,需要同步到的 Gitee 用户(目的)
|
||||||
|
dst: 'gitee/${{ secrets.GITEE_USER }}'
|
||||||
|
# 必选,Gitee公钥对应的私钥,https://gitee.com/profile/sshkeys
|
||||||
|
dst_key: ${{ secrets.GITEE_PRIVATE_KEY }}
|
||||||
|
# 必选,Gitee对应的用于创建仓库的token,https://gitee.com/profile/personal_access_tokens
|
||||||
|
dst_token: ${{ secrets.GITEE_TOKEN }}
|
||||||
|
# 如果是组织,指定组织即可,默认为用户 user
|
||||||
|
# account_type: org
|
||||||
|
# 直接取当前项目的仓库名
|
||||||
|
static_list: ${{ github.event.repository.name }}
|
||||||
|
# 还有黑、白名单,静态名单机制,可以用于更新某些指定库
|
||||||
|
# static_list: 'repo_name,repo_name2'
|
||||||
|
# black_list: 'repo_name,repo_name2'
|
||||||
|
# white_list: 'repo_name,repo_name2'
|
||||||
+63
@@ -0,0 +1,63 @@
|
|||||||
|
# Logs
|
||||||
|
logs
|
||||||
|
*.log
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
|
||||||
|
# Runtime data
|
||||||
|
pids
|
||||||
|
*.pid
|
||||||
|
*.seed
|
||||||
|
*.pid.lock
|
||||||
|
|
||||||
|
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||||
|
lib-cov
|
||||||
|
|
||||||
|
# Coverage directory used by tools like istanbul
|
||||||
|
coverage
|
||||||
|
|
||||||
|
# nyc test coverage
|
||||||
|
.nyc_output
|
||||||
|
|
||||||
|
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
|
||||||
|
.grunt
|
||||||
|
|
||||||
|
# Bower dependency directory (https://bower.io/)
|
||||||
|
bower_components
|
||||||
|
|
||||||
|
# node-waf configuration
|
||||||
|
.lock-wscript
|
||||||
|
|
||||||
|
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
||||||
|
build/Release
|
||||||
|
|
||||||
|
# Dependency directories
|
||||||
|
node_modules/
|
||||||
|
jspm_packages/
|
||||||
|
|
||||||
|
# TypeScript v1 declaration files
|
||||||
|
typings/
|
||||||
|
|
||||||
|
# Optional npm cache directory
|
||||||
|
.npm
|
||||||
|
|
||||||
|
# Optional eslint cache
|
||||||
|
.eslintcache
|
||||||
|
|
||||||
|
# Optional REPL history
|
||||||
|
.node_repl_history
|
||||||
|
|
||||||
|
# Output of 'npm pack'
|
||||||
|
*.tgz
|
||||||
|
|
||||||
|
# Yarn Integrity file
|
||||||
|
.yarn-integrity
|
||||||
|
|
||||||
|
# dotenv environment variables file
|
||||||
|
.env
|
||||||
|
|
||||||
|
# next.js build output
|
||||||
|
.next
|
||||||
|
.idea/
|
||||||
|
.vscode/settings.json
|
||||||
Reference in New Issue
Block a user