From 80af095281f5c2a66a0c2541ec6cfb0c920113ae Mon Sep 17 00:00:00 2001 From: test Date: Thu, 20 Nov 2025 22:33:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=9D=E8=AF=95GitHub=E6=8B=89=E5=8F=96gitee?= =?UTF-8?q?=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/update.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/update.yml 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