Skip to content

GitHub IPTV 1080 Bot #903

GitHub IPTV 1080 Bot

GitHub IPTV 1080 Bot #903

Workflow file for this run

name: 'GitHub IPTV 1080 Bot'
on:
push:
# push 到main分支时触发
branches: [main]
schedule:
# 每天触发一次
- cron: '0 3 * * *'
jobs:
bot:
runs-on: ubuntu-latest
steps:
# 从仓库获取代码
- name: 'Checkout codes'
uses: actions/checkout@v1
- name: Setup Node.js
uses: actions/setup-node@v1
with:
# 选择要使用的 node 版本
node-version: '14.18.3'
- name: 安装ffmpeg
uses: FedericoCarboni/setup-ffmpeg@v1
- name: 根据规则生成电视节目列表
run: |
# npm install -g iptv-checker # 安装IPTV filter
wget https://iptv-org.github.io/iptv/countries/cn.m3u 2>/dev/null -O cn.m3u.tmp
if [ ! -d "cn_1080" ]; then
mkdir cn_1080
fi
echo "#EXTM3U" > cn_1080/cn1080.m3u
./cnm3uParser >> cn_1080/cn1080.m3u
#'从custom_list中添加'
#cat custom_list/50fps_4k.m3u custom_list/aqiyi_4k.m3u >> cn1080.m3u
# echo "#EXTM3U" > cn1080.m3u
# python filter_m3u.py >> cn1080.m3u # 按黑白名单过滤
# IPTV检查, TODO: 用更好的方式获取iptv-checker path
# /opt/hostedtoolcache/node/14.18.3/x64/bin/iptv-checker cn1080.m3u -o cn_1080
# mv cn_1080/online.m3u cn_1080/cn1080.m3u
- name: 'Push branch'
uses: crazy-max/ghaction-github-pages@v2
with:
# 部署到 gh 分支
target_branch: gh
# 部署目录为脚本的输出目录
build_dir: cn_1080
env:
# @see https://docs.github.com/cn/actions/reference/authentication-in-a-workflow#about-the-github_token-secret
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}