Push Gist to SSR Repo #209
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Push Gist to SSR Repo | |
on: | |
schedule: | |
- cron: '0 0,12 * * *' # 每天北京时间 08:00 和 20:00 执行 | |
workflow_dispatch: # 支持手动触发 | |
jobs: | |
push-to-ssr-repo: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone target repository | |
uses: actions/checkout@v4 | |
with: | |
repository: ssrsub/ssr | |
token: ${{ secrets.SSR_PUSH_TOKEN }} | |
ref: master | |
- name: Download Gist Files to root | |
run: | | |
curl -sL "https://gist.githubusercontent.com/Dafeide/ccb461e88dd99eb4a95a442dbb328064/raw/clash.yaml" -o clash.yaml | |
curl -sL "https://gist.githubusercontent.com/Dafeide/ccb461e88dd99eb4a95a442dbb328064/raw/sing-box.json" -o singbox.json | |
curl -sL "https://gist.githubusercontent.com/Dafeide/ccb461e88dd99eb4a95a442dbb328064/raw/v2ray" -o v2ray | |
- name: Commit and Push | |
run: | | |
git config user.name "github-actions[bot]" | |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git add clash.yaml singbox.json v2ray | |
git diff --cached --quiet || git commit -m "Update configs from Gist at $(date -u)" | |
git push origin master |