CI #659
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: CI | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Download IP list | |
run: | | |
set -e # 出现错误时停止执行 | |
rm -f ip.txt | |
{ | |
wget -qO- https://www.cloudflare-cn.com/ips-v4/# | |
echo "" | |
wget -qO- https://www.cloudflare.com/ips-v6/# | |
} | tee -a ip.txt | |
- name: Make script executable and install dependencies | |
run: | | |
set -e | |
chmod +x CloudflareST | |
pip install pandas | |
- name: Run TLS scan | |
run: | | |
set -e | |
./CloudflareST -httping -cfcolo HKG,KHH,NRT,LAX,SEA,SJC,FRA,MAD | |
python convert_csv_to_tls.py | |
- name: Commit and push changes | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
set -e | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add *.txt | |
git commit -m "Update IP list" | |
git push |