Update IPTV Mainland Domain Rules #1
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 IPTV Mainland Domain Rules | |
on: | |
schedule: | |
- cron: "0 */8 * * *" # 每隔8小时触发一次 | |
workflow_dispatch: # 手动触发 | |
jobs: | |
update-rules: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Fetch IPTVMainland Rules | |
run: | | |
curl -sSL https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/master/rule/Clash/IPTVMainland/IPTVMainland.list -o IPTVMainland.list | |
- name: Process Rules | |
run: | | |
mkdir -p rule # 确保 rule 文件夹存在 | |
echo "# 中国大陆地区 IPTV 域名列表" > rule/IPTVMainland_Domain.list | |
echo "# 每隔8小时更新一次,从 blackmatrix7/ios_rule_script 项目拉取,并去除所有 IP 类规则,仅保留域名规则" >> rule/IPTVMainland_Domain.list | |
grep -v "IP-CIDR" IPTVMainland.list >> rule/IPTVMainland_Domain.list | |
- name: Commit and Push Changes | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
git add rule/IPTVMainland_Domain.list | |
git commit -m "Update IPTVMainland_Domain.list" | |
git push |