diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml new file mode 100644 index 0000000..d2f38e5 --- /dev/null +++ b/.github/workflows/update.yml @@ -0,0 +1,30 @@ +name: update +on: + workflow_dispatch: + # push: + schedule: + - cron: 2 */2 * * * +jobs: + run: + runs-on: ubuntu-latest + timeout-minutes: 2 + steps: + - name: 检出 + uses: actions/checkout@v4 + - name: 拉取Gitee仓库 + env: + GITEE_TOKEN: ${{ secrets.GITEE_TOKEN }} + run: git clone https://dream-deve:${GITEE_TOKEN}@gitee.com/dream-deve/migu_video.git + - name: 更新内容 + run: | + cp migu_video/interface.txt . + cp migu_video/playback.xml . + - name: 推送 + run: | + if ! git diff --quiet --exit-code || [ -n "$(git status --porcelain)" ]; then + git config user.name "GitHub Actions" + git config user.email "actions@github.com" + git add . + git commit -m "Update by GitHub Actions" + git push + fi