浏览代码

add: 定时同步到GitHub

chenxuuu 3 年之前
父节点
当前提交
4cb34d5d9c
共有 1 个文件被更改,包括 25 次插入0 次删除
  1. 25 0
      .github/workflows/sync_from_gitee.yml

+ 25 - 0
.github/workflows/sync_from_gitee.yml

@@ -0,0 +1,25 @@
+name: sync_from_gitee
+
+on:
+  workflow_dispatch:
+  schedule:
+    #ÿÌìÕâ¸öʱ¼ä¶¨Ê±Í¬²½
+    - cron:  '0 3 * * *'
+
+jobs:
+  build:
+    runs-on: ubuntu-latest
+    steps:
+    - uses: actions/checkout@v2
+      with:
+        persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.
+        fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
+    - name: sync from gitee
+      run: |
+        git remote add gitee https://gitee.com/openLuat/luatos-soc-air105.git
+        git pull gitee master
+    - name: Push changes
+      uses: ad-m/github-push-action@master
+      with:
+        github_token: ${{ secrets.GITHUB_TOKEN }}
+        branch: ${{ github.ref }}