Skip to content

备份 randpic

备份 randpic #6

Workflow file for this run

name: 备份 randpic
on:
workflow_dispatch:
schedule:
- cron: '0 22 * * *'
permissions:
contents: write
deployments: write
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: 检出仓库
uses: actions/checkout@v4
- name: 删除当前 randpic 文件夹
run: |
rm -rf randpic
ls -la
- name: 下载新的备份
run: python get.py
- name: 上传新备份
if: steps.check.outputs.changed == 'true'
run: |
git config --local user.email "[email protected]"
git config --local user.name "[Actions] 自动同步"
git add .
git commit -m "Sync"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}