Skip to content

backup

backup #627

Workflow file for this run

name: backup
on:
workflow_dispatch:
push:
branches:
- master
paths:
- "xiaoyahelper/**"
- ".github/workflows/backup.yml"
schedule:
- cron: '0 */12 * * *'
jobs:
xiaoyahelper:
runs-on: ubuntu-latest
name: xiaoyahelper
steps:
- name: Checkout
uses: actions/checkout@v4
- name: xiaoyahelper
run: |
mv ./xiaoyahelper/aliyun_clear.sh ./xiaoyahelper/aliyun_clear.sh.backup
wget -O ./xiaoyahelper/aliyun_clear.sh https://xiaoyahelper.zengge99.eu.org/aliyun_clear.sh
if [ -f ./xiaoyahelper/aliyun_clear.sh ]; then
rm -rf ./xiaoyahelper/aliyun_clear.sh.backup
else
mv ./xiaoyahelper/aliyun_clear.sh.backup ./xiaoyahelper/aliyun_clear.sh
fi
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: 'chore: backup xiaoyahelper'
branch: master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}