Skip to content

Sync

Sync #42

Workflow file for this run

name: Sync
on:
schedule:
- cron: '0 0 * * *' # 每天执行一次
workflow_dispatch: # 允许手动触发
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout your repo
uses: actions/checkout@v2
- name: Download gfwlist.txt from upstream
run: |
# 下载文件
curl -L -o gfwlist.txt https://raw.githubusercontent.com/gfwlist/gfwlist/master/gfwlist.txt
# 配置 git 提交信息
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
# 添加文件并提交更改(如果有)
git add gfwlist.txt
if git diff --cached --quiet; then
echo "No changes to commit"
else
git commit -m "Auto-sync gfwlist.txt from upstream"
git push origin master
fi