Add GitHub Actions workflow for Google Drive sync

This commit is contained in:
冰朔 2026-03-24 08:05:43 +08:00 committed by GitHub
parent 28b290dacb
commit cdb1db2db6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 23 additions and 0 deletions

23
.github/workflows/sync.yml vendored Normal file
View File

@ -0,0 +1,23 @@
name: Guanghu Grid Sync
on:
push:
branches:
- main # 当你修改仓库代码时自动触发
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Sync to Google Drive
uses: wei/rclone@v1
env:
RCLONE_CONFIG_DRIVE_TYPE: drive
RCLONE_CONFIG_DRIVE_SCOPE: drive
RCLONE_CONFIG_DRIVE_SERVICE_ACCOUNT_CONTENTS: ${{ secrets.GOOGLE_DRIVE_SERVICE_ACCOUNT }}
RCLONE_CONFIG_DRIVE_ROOT_FOLDER_ID: ${{ secrets.DRIVE_MIRROR_FOLDER_ID }}
with:
args: sync . drive: