Update 1.yml from URL #49
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
name: Update 1.yml from URL | |
on: | |
schedule: | |
# 每隔10分钟运行一次 | |
- cron: '*/10 * * * *' | |
jobs: | |
update-file: | |
runs-on: ubuntu-latest | |
steps: | |
# Step 1: 检出仓库 | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
# Step 2: 抓取指定链接的数据 | |
- name: Fetch data from URL | |
run: | | |
curl -o fetched_data.txt "https://subconverters.com/sub?target=clash&url=https%3A%2F%2Fraw.githubusercontent.com%2Fpeasoft%2FNoMoreWalls%2Fmaster%2Flist.yml%7Chttps%3A%2F%2Fraw.githubusercontent.com%2Froosterkid%2Fopenproxylist%2Fmain%2FV2RAY_BASE64.txt%7Chttps%3A%2F%2Fwww.xrayvip.com%2Ffree.yaml&insert=false&config=https%3A%2F%2Fraw.githubusercontent.com%2FACL4SSR%2FACL4SSR%2Fmaster%2FClash%2Fconfig%2FACL4SSR_Online_Full_AdblockPlus.ini&interval=86400&append_type=true&tls13=true&sort=true&emoji=true&list=false&xudp=true&udp=true&tfo=true&expand=true&scv=false&fdn=false&new_name=true" | |
# Step 3: 更新仓库中的 1.yml 文件 | |
- name: Update 1.yml | |
run: | | |
cat fetched_data.txt > 1.yml | |
# Step 4: 提交更改并推送到仓库 | |
- name: Commit and push changes | |
run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
git add 1.yml | |
git commit -m "Auto-update 1.yml with data from URL" | |
git push |