Daily Update #8912
This file contains 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
# Update subscription links | |
name: Daily Update | |
on: | |
# 8-20 beijin | |
# Runs at 0-12 UTC every day | |
schedule: | |
- cron: "0 0-16 * * *" | |
# Manual updates | |
workflow_dispatch: | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
steps: | |
# Checks-out the repository under $GITHUB_WORKSPACE | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Fetch Free Clash Node | |
run: node index.js | |
- name: Refresh CDN | |
run: node refreshcdn.js | |
- name: Commit Newest Node | |
# Condition to prevent unintended automatic workflow | |
# Change or comment out this line for automatic workflow on forks | |
if: ${{ github.repository == 'itxve/fetch-clash-node' }} | |
run: | | |
git config --global user.name "GitHub Action" | |
git config --global user.email "[email protected]" | |
git add ./node README.md | |
git commit -m "update node" && git push || echo "no change" |