purge history
This commit is contained in:
Executable
+34
@@ -0,0 +1,34 @@
|
||||
# **免责声明**
|
||||
|
||||
本项目(以下称“本仓库”)提供的代码、接口及文档仅供技术研究、学习交流及合法用途使用,严禁用于任何商业或非法目的。使用者需自行承担因使用本项目产生的全部责任。
|
||||
|
||||
## 1. **数据来源说明**
|
||||
- 本仓库中涉及的接口、数据或资源均**来自互联网公开内容**,可能通过技术手段(如网络爬虫、公开 API 等)收集整理。
|
||||
- 所有数据内容均**由第三方提供**,本仓库**不存储、不修改、不控制**任何音视频、图文或其他形式的内容,仅提供技术接口或工具。
|
||||
- 项目维护者**无法保证**接口的稳定性、内容的合法性、准确性或时效性,亦不对第三方资源的版权、内容质量负责。
|
||||
|
||||
## 2. **用户责任**
|
||||
- 使用者需遵守所在国家/地区的法律法规,禁止利用本项目从事以下行为:
|
||||
- 传播盗版、色情、暴力或其他违法内容。
|
||||
- 侵犯他人知识产权、隐私权等合法权益。
|
||||
- 对第三方服务器发起恶意攻击或干扰正常服务。
|
||||
- 使用者应自行判断并承担因访问或使用第三方资源导致的**一切风险**,维护者不承担任何责任。
|
||||
|
||||
## 3. **免责条款**
|
||||
- 本仓库维护者及贡献者**不对以下情况负责**:
|
||||
- 因使用本项目导致的设备损坏、数据丢失或法律纠纷。
|
||||
- 第三方接口失效、内容下架或服务终止造成的使用问题。
|
||||
- 用户滥用本项目功能产生的直接或间接后果。
|
||||
- 本仓库提供的代码及文档均以“**原样**”提供,不承诺提供任何形式的担保。
|
||||
|
||||
## 4. **第三方内容与版权**
|
||||
- 若您认为本项目引用的资源侵犯了您的权益,请通过 [联系方式] 提交有效证明,我们将在核实后移除相关内容。
|
||||
- 本仓库遵循**技术中立原则**,不参与任何资源的创作、分发或盈利,请通过合法渠道支持正版内容。
|
||||
|
||||
## 5. **使用条款**
|
||||
- 下载、复制、修改或使用本仓库内容即视为**已阅读并同意本声明**。
|
||||
- 本仓库维护者保留随时修改或更新此免责声明的权利,恕不另行通知。
|
||||
|
||||
---
|
||||
|
||||
**联系方式**:<a href="mailto:clun@duck.com">clun@duck.com</a>(如需内容移除或合作,请注明事由)
|
||||
Executable
+15
@@ -0,0 +1,15 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: [cluntop] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||
# patreon: # Replace with a single Patreon username
|
||||
# open_collective: # Replace with a single Open Collective username
|
||||
# ko_fi: # Replace with a single Ko-fi username
|
||||
# tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
# community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
# liberapay: # Replace with a single Liberapay username
|
||||
# issuehunt: # Replace with a single IssueHunt username
|
||||
# lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
||||
# polar: # Replace with a single Polar username
|
||||
# buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
|
||||
# thanks_dev: # Replace with a single thanks.dev username
|
||||
# custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
||||
Executable
+79
@@ -0,0 +1,79 @@
|
||||
###### ⚠️ **重要提示**:使用前请务必阅读 [免责声明](DISCLAIMER.md)
|
||||
|
||||
#### 群组里有 Github 通知 [频道](https://t.me/clun_tz) / [群组](https://t.me/clun_top)
|
||||
|
||||
#### 欢迎 Star 及 PR。
|
||||
|
||||
<details>
|
||||
<summary>贡献指南</summary>
|
||||
|
||||
###### 欢迎贡献代码!请随时提交 Pull Request。
|
||||
|
||||
###### Fork 仓库 cluntop/tvbox
|
||||
|
||||
> 创建功能分支(`git checkout -b cluntop/tvbox`)
|
||||
|
||||
> 提交更改(`git commit -m '添加某些说明'`)
|
||||
|
||||
> 推送到分支(`git push origin cluntop/tvbox`)
|
||||
|
||||
> 打开 Pull Request
|
||||
|
||||
###### WebDav TVbox 接口配置
|
||||
|
||||
```
|
||||
例如 https://pan.clun.top/dav
|
||||
主机 pan.clun.top
|
||||
路径 /dav
|
||||
协议 SSL
|
||||
接口 443
|
||||
账号 tvbox
|
||||
密码 tvbox
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>TVBox 自用接口</summary>
|
||||
|
||||
###### TVBox 自用 接口
|
||||
```
|
||||
https://clun.top/box.json
|
||||
```
|
||||
|
||||
###### TVBox PG 接口
|
||||
```
|
||||
https://clun.top/jsm.json
|
||||
```
|
||||
|
||||
###### TVBox 18+ 接口
|
||||
```
|
||||
https://clun.top/fun.json
|
||||
```
|
||||
|
||||
###### TVBox 张佬 接口
|
||||
```
|
||||
https://clun.top/js/aa.json
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>TVBox APP 下载</summary>
|
||||
|
||||
###### FongMi leanback [v7a](https://gh.clun.top/raw.githubusercontent.com/FongMi/Release/refs/heads/fongmi/apk/release/leanback-armeabi_v7a.apk) [v8a](https://gh.clun.top/raw.githubusercontent.com/FongMi/Release/refs/heads/fongmi/apk/release/leanback-arm64_v8a.apk)
|
||||
|
||||
###### okjack leanback [v7a](https://gh.clun.top/raw.githubusercontent.com/FongMi/Release/refs/heads/okjack/apk/release/leanback-armeabi_v7a.apk) [v8a](https://gh.clun.top/raw.githubusercontent.com/FongMi/Release/refs/heads/okjack/apk/release/leanback-arm64_v8a.apk)
|
||||
|
||||
###### FongMi mobile [v7a](https://gh.clun.top/raw.githubusercontent.com/FongMi/Release/refs/heads/fongmi/apk/release/mobile-armeabi_v7a.apk) [v8a](https://gh.clun.top/raw.githubusercontent.com/FongMi/Release/refs/heads/fongmi/apk/release/mobile-arm64_v8a.apk)
|
||||
|
||||
###### okjack mobile [v7a](https://gh.clun.top/raw.githubusercontent.com/FongMi/Release/refs/heads/okjack/apk/release/mobile-armeabi_v7a.apk) [v8a](https://gh.clun.top/raw.githubusercontent.com/FongMi/Release/refs/heads/okjack/apk/release/mobile-arm64_v8a.apk)
|
||||
|
||||
> mobile = 手机版
|
||||
> leanback = 电视版
|
||||
|
||||
> arm64_v8a = 64 位元
|
||||
> armeabi_v7a = 32 位元
|
||||
|
||||
</details>
|
||||
|
||||
Executable
+33
@@ -0,0 +1,33 @@
|
||||
# To get started with Dependabot version updates, you'll need to specify which
|
||||
# package ecosystems to update and where the package manifests are located.
|
||||
# Please see the documentation for all configuration options:
|
||||
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions" # See documentation for possible values
|
||||
directory: "/" # Location of package manifests
|
||||
schedule:
|
||||
interval: "daily"
|
||||
day: "monday"
|
||||
timezone: "Asia/Shanghai"
|
||||
time: "09:00"
|
||||
|
||||
groups:
|
||||
all-actions:
|
||||
patterns:
|
||||
- "*"
|
||||
|
||||
open-pull-requests-limit: 10
|
||||
|
||||
commit-message:
|
||||
prefix: "ci"
|
||||
prefix-development: "ci"
|
||||
include: "scope"
|
||||
|
||||
labels:
|
||||
- "dependencies"
|
||||
- "documentation"
|
||||
|
||||
pull-request-branch-name:
|
||||
separator: "-"
|
||||
Executable
+138
@@ -0,0 +1,138 @@
|
||||
"ijk": [{
|
||||
"group": "软解码",
|
||||
"options": [{
|
||||
"category": 4,
|
||||
"name": "opensles",
|
||||
"value": "0"
|
||||
}, {
|
||||
"category": 4,
|
||||
"name": "overlay-format",
|
||||
"value": "842225234"
|
||||
}, {
|
||||
"category": 4,
|
||||
"name": "framedrop",
|
||||
"value": "1"
|
||||
}, {
|
||||
"category": 4,
|
||||
"name": "soundtouch",
|
||||
"value": "1"
|
||||
}, {
|
||||
"category": 4,
|
||||
"name": "start-on-prepared",
|
||||
"value": "1"
|
||||
}, {
|
||||
"category": 1,
|
||||
"name": "http-detect-range-support",
|
||||
"value": "0"
|
||||
}, {
|
||||
"category": 1,
|
||||
"name": "fflags",
|
||||
"value": "fastseek"
|
||||
}, {
|
||||
"category": 2,
|
||||
"name": "skip_loop_filter",
|
||||
"value": "48"
|
||||
}, {
|
||||
"category": 4,
|
||||
"name": "reconnect",
|
||||
"value": "1"
|
||||
}, {
|
||||
"category": 4,
|
||||
"name": "max-buffer-size",
|
||||
"value": "8388608"
|
||||
}, {
|
||||
"category": 4,
|
||||
"name": "enable-accurate-seek",
|
||||
"value": "0"
|
||||
}, {
|
||||
"category": 4,
|
||||
"name": "mediacodec",
|
||||
"value": "0"
|
||||
}, {
|
||||
"category": 4,
|
||||
"name": "mediacodec-auto-rotate",
|
||||
"value": "0"
|
||||
}, {
|
||||
"category": 4,
|
||||
"name": "mediacodec-handle-resolution-change",
|
||||
"value": "0"
|
||||
}, {
|
||||
"category": 4,
|
||||
"name": "mediacodec-hevc",
|
||||
"value": "0"
|
||||
}, {
|
||||
"category": 1,
|
||||
"name": "dns_cache_timeout",
|
||||
"value": "600000000"
|
||||
}
|
||||
]
|
||||
}, {
|
||||
"group": "硬解码",
|
||||
"options": [{
|
||||
"category": 4,
|
||||
"name": "opensles",
|
||||
"value": "0"
|
||||
}, {
|
||||
"category": 4,
|
||||
"name": "overlay-format",
|
||||
"value": "842225234"
|
||||
}, {
|
||||
"category": 4,
|
||||
"name": "framedrop",
|
||||
"value": "1"
|
||||
}, {
|
||||
"category": 4,
|
||||
"name": "soundtouch",
|
||||
"value": "1"
|
||||
}, {
|
||||
"category": 4,
|
||||
"name": "start-on-prepared",
|
||||
"value": "1"
|
||||
}, {
|
||||
"category": 1,
|
||||
"name": "http-detect-range-support",
|
||||
"value": "0"
|
||||
}, {
|
||||
"category": 1,
|
||||
"name": "fflags",
|
||||
"value": "fastseek"
|
||||
}, {
|
||||
"category": 2,
|
||||
"name": "skip_loop_filter",
|
||||
"value": "48"
|
||||
}, {
|
||||
"category": 4,
|
||||
"name": "reconnect",
|
||||
"value": "1"
|
||||
}, {
|
||||
"category": 4,
|
||||
"name": "max-buffer-size",
|
||||
"value": "12582912"
|
||||
}, {
|
||||
"category": 4,
|
||||
"name": "enable-accurate-seek",
|
||||
"value": "0"
|
||||
}, {
|
||||
"category": 4,
|
||||
"name": "mediacodec",
|
||||
"value": "1"
|
||||
}, {
|
||||
"category": 4,
|
||||
"name": "mediacodec-auto-rotate",
|
||||
"value": "1"
|
||||
}, {
|
||||
"category": 4,
|
||||
"name": "mediacodec-handle-resolution-change",
|
||||
"value": "1"
|
||||
}, {
|
||||
"category": 4,
|
||||
"name": "mediacodec-hevc",
|
||||
"value": "1"
|
||||
}, {
|
||||
"category": 1,
|
||||
"name": "dns_cache_timeout",
|
||||
"value": "600000000"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
Executable
+6
@@ -0,0 +1,6 @@
|
||||
GitPython==3.1.43
|
||||
Telethon==1.37.0
|
||||
requests==2.32.4
|
||||
typing_extensions==4.12.2
|
||||
demoji==1.1.0
|
||||
tqdm==4.66.5
|
||||
Executable
Executable
+66
@@ -0,0 +1,66 @@
|
||||
{
|
||||
"key": "豆瓣",
|
||||
"name": "豆瓣",
|
||||
"type": 3,
|
||||
"api": "csp_Douban",
|
||||
"searchable": 0,
|
||||
"changeable": 1,
|
||||
"indexs": 1,
|
||||
"ext": "./lib/tokenm.json$$$./lib/douban.json"
|
||||
},
|
||||
{
|
||||
"key": "嗷呜弹幕",
|
||||
"name": "弹幕",
|
||||
"type": 3,
|
||||
"jar": "./jar/spider-woof.jar",
|
||||
"api": "csp_GoConfig",
|
||||
"indexs": 1,
|
||||
"searchable": 0,
|
||||
"filterable": 0,
|
||||
"quickSearch": 0,
|
||||
"changeable": 0,
|
||||
"ext": "./lib"
|
||||
},
|
||||
{
|
||||
"key": "AList",
|
||||
"name": "Alist",
|
||||
"type": 3,
|
||||
"api": "csp_AList",
|
||||
"searchable": 1,
|
||||
"filterable": 1,
|
||||
"changeable": 1,
|
||||
"timeout": 60,
|
||||
"vodPic": "./img/file.jpg",
|
||||
"ext": "./js/alist.json"
|
||||
},
|
||||
{
|
||||
"key": "BiliBili",
|
||||
"name": "Bili_MTV",
|
||||
"type": 3,
|
||||
"api": "csp_Bili",
|
||||
"style": {
|
||||
"type": "rect",
|
||||
"ratio": 1.597
|
||||
},
|
||||
"searchable": 1,
|
||||
"quickSearch": 0,
|
||||
"changeable": 0,
|
||||
"timeout": 60,
|
||||
"ext": {
|
||||
"json": "./js/mtv.json",
|
||||
"cookie": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"key": "采集集合",
|
||||
"name": "采集集合",
|
||||
"type": 1,
|
||||
"api": "http://127.0.0.1:1988/lb?lb=3",
|
||||
"jar": "./jar/yt-aa.jar",
|
||||
"searchable": 1,
|
||||
"style": {
|
||||
"type": "rect",
|
||||
"ratio": 1.33
|
||||
},
|
||||
"changeable": 1
|
||||
}
|
||||
Executable
+45
@@ -0,0 +1,45 @@
|
||||
//searchable:搜索开关 0:关闭;1:启用
|
||||
//filterable:筛选开关 0:关闭;1:启用
|
||||
//changeable:换源开关 0:关闭;1:启用
|
||||
//quickSearch:快速开关 0:关闭;1:启用
|
||||
//playerType:播放器类型 1:IJK;2:EXO
|
||||
//采集接口类型 0:xml;1:json
|
||||
//parses:解析类型 0,嗅探,自带播放器;1,解析,返回直链
|
||||
|
||||
小苹果影视
|
||||
https://framagit.org/168/myys/-/raw/main/bb/jar/fenghuang.jar
|
||||
|
||||
"categories": ["国产动漫", "日韩动漫", "国产剧"]
|
||||
|
||||
影视点播源
|
||||
https://json.doube.eu.org/t3.php
|
||||
|
||||
https://www.xn--sss604efuw.com/jm/
|
||||
|
||||
分类url .cateId=分类 .class=类型 .area=地区 .lang=语言 .year=年份 .by=排序 .catePg=类别?
|
||||
|
||||
https://github.com/hjdhnx/drpy-node
|
||||
|
||||
https://github.com/fangkuia/XPTV
|
||||
https://github.com/fafa002/yf2025
|
||||
https://github.com/fanmingming/live
|
||||
https://github.com/yoursmile66/TVBox
|
||||
https://github.com/977567941/Kowaryou
|
||||
https://github.com/xyq254245/xyqonlinerule
|
||||
https://github.com/towerstreet/IPTV-TVBOX
|
||||
https://github.com/fastbuild7099/fastbuild7099
|
||||
|
||||
-
|
||||
|
||||
https://github.com/xMydev/TVBoxRuleMaster
|
||||
|
||||
https://gitee.com/PizazzXS/another-d
|
||||
|
||||
|
||||
https://raw.githubusercontent.com/ljlfct01/ljlfct01.github.io/main/%E8%85%BE%E4%BA%914k.js
|
||||
|
||||
https://gitee.com/yuyu10588/tt/raw/t/t/drpy2.min.js
|
||||
|
||||
https://www.gitlink.org.cn/LLwj/dmbj
|
||||
http://www.kgj.cc/?post=1137
|
||||
|
||||
Executable
+59
@@ -0,0 +1,59 @@
|
||||
name: Clean up the garbage
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 4 7 * *'
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout target repo
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
repository: cluntop/tvbox
|
||||
token: ${{ secrets.GIT_TOKEN }}
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Install git-filter-repo
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y python3-pip
|
||||
pip3 install git-filter-repo
|
||||
|
||||
- name: Configure Git
|
||||
run: |
|
||||
git config --global user.name "GitHub Actions"
|
||||
git config --global user.email "actions@github.com"
|
||||
|
||||
- name: Compressing
|
||||
run: |
|
||||
git prune-packed
|
||||
git reflog expire --expire=now --all
|
||||
git gc --prune=now --aggressive
|
||||
|
||||
- name: Force Push Changes
|
||||
run: |
|
||||
git push origin --force --all
|
||||
git push origin --force --tags
|
||||
|
||||
- name: Reset History
|
||||
run: |
|
||||
git checkout --orphan latest_branch
|
||||
git add -A
|
||||
git commit -m "purge history"
|
||||
git branch -D main
|
||||
git branch -m main
|
||||
|
||||
- name: Force Push to Remote
|
||||
run: |
|
||||
git push -f origin main
|
||||
@@ -0,0 +1,16 @@
|
||||
name: Greetings
|
||||
|
||||
on: [pull_request_target, issues]
|
||||
|
||||
jobs:
|
||||
greeting:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- uses: actions/first-interaction@v3
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-message: "Message that will be displayed on users' first issue"
|
||||
pr-message: "Message that will be displayed on users' first pull request"
|
||||
@@ -0,0 +1,53 @@
|
||||
name: Auto Update JS MD5
|
||||
|
||||
on:
|
||||
# 监听代码推送
|
||||
push:
|
||||
# 只有当 .js 文件发生变化时才触发,避免无意义运行
|
||||
paths:
|
||||
- '**.js'
|
||||
- '.github/workflows/md5.yml' # 方便调试脚本本身
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
generate-md5:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: 📥 Checkout Code
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0 # 获取完整历史,方便提交
|
||||
|
||||
- name: 🧮 Calculate & Update MD5
|
||||
run: |
|
||||
echo "开始扫描所有 .js 文件..."
|
||||
|
||||
find . -type f -name "*.js" -not -path '*/.git/*' | while read -r file; do
|
||||
|
||||
current_md5=$(md5sum "$file" | awk '{print $1}')
|
||||
|
||||
target_file="${file}.md5"
|
||||
|
||||
echo "$current_md5" > "$target_file"
|
||||
|
||||
echo "✅ 已更新: $target_file -> $current_md5"
|
||||
done
|
||||
|
||||
- name: 📤 Commit & Push Changes
|
||||
run: |
|
||||
# 配置机器人身份
|
||||
git config --global user.name "github-actions[bot]"
|
||||
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
|
||||
git add **/*.js.md5
|
||||
|
||||
if ! git diff-index --quiet HEAD; then
|
||||
git commit -m "Update md5"
|
||||
git push
|
||||
echo "::notice::🚀 MD5 文件已更新并推送!"
|
||||
else
|
||||
echo "::notice::⚠️ MD5 值没有变化,跳过提交。"
|
||||
fi
|
||||
Executable
+99
@@ -0,0 +1,99 @@
|
||||
# Simple workflow for deploying static content to GitHub Pages
|
||||
name: Update Deploy to Pages
|
||||
|
||||
on:
|
||||
# Runs on pushes targeting the default branch
|
||||
push:
|
||||
branches: ["main"]
|
||||
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
DEPLOY_REF: ${{ github.event.inputs.deploy_branch || github.ref }}
|
||||
UPLOAD_PATH: "."
|
||||
TZ: Asia/Shanghai
|
||||
|
||||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
||||
permissions:
|
||||
contents: write
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
|
||||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
|
||||
concurrency:
|
||||
group: "pages"
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
# Single deploy job since we're just deploying
|
||||
deploy:
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
repository: cluntop/tvbox
|
||||
token: ${{ secrets.GIT_TOKEN }}
|
||||
fetch-depth: 1
|
||||
lfs: true
|
||||
|
||||
- name: 🔄 Auto Commit Timestamp
|
||||
if: github.event_name == 'schedule'
|
||||
run: |
|
||||
cd ${{ env.UPLOAD_PATH }}
|
||||
echo "Last deployment run at: $(date)" > last_run.txt
|
||||
git config --global user.name "github-actions[bot]"
|
||||
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git add last_run.txt
|
||||
if ! git diff-index --quiet HEAD; then
|
||||
git commit -m "🤖 Auto-update: Scheduled deployment [skip ci]"
|
||||
git push
|
||||
echo "::notice::✅ 已自动提交更新时间戳"
|
||||
else
|
||||
echo "::notice::⚠️ 无文件变更,跳过提交"
|
||||
fi
|
||||
|
||||
- name: Verify & Generate CNAME
|
||||
run: |
|
||||
echo "clun.top" > ${{ env.UPLOAD_PATH }}/CNAME
|
||||
FILE_COUNT=$(find ${{ env.UPLOAD_PATH }} -type f | wc -l)
|
||||
SIZE=$(du -sh ${{ env.UPLOAD_PATH }} | cut -f1)
|
||||
|
||||
echo "### 📦 部署准备就绪" >> $GITHUB_STEP_SUMMARY
|
||||
echo "- **分支**: \`${{ env.DEPLOY_REF }}\`" >> $GITHUB_STEP_SUMMARY
|
||||
echo "- **文件数量**: $FILE_COUNT" >> $GITHUB_STEP_SUMMARY
|
||||
echo "- **总大小**: $SIZE" >> $GITHUB_STEP_SUMMARY
|
||||
|
||||
if [ "$FILE_COUNT" -eq 0 ]; then
|
||||
echo "::error::❌ 目录下没有文件,终止部署!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Setup Pages
|
||||
uses: actions/configure-pages@v5
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v4
|
||||
with:
|
||||
# Upload entire repository
|
||||
path: ${{ env.UPLOAD_PATH }}
|
||||
retention-days: 1
|
||||
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
|
||||
- name: Deployment Success Info
|
||||
if: success()
|
||||
run: |
|
||||
echo "::notice title=部署成功::✅ 您的站点已上线!"
|
||||
echo "### 🚀 部署成功!" >> $GITHUB_STEP_SUMMARY
|
||||
echo "访问地址: [${{ steps.deployment.outputs.page_url }}](${{ steps.deployment.outputs.page_url }})" >> $GITHUB_STEP_SUMMARY
|
||||
@@ -0,0 +1,38 @@
|
||||
name: Summarize new issues
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [opened]
|
||||
|
||||
jobs:
|
||||
summary:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
models: read
|
||||
contents: read
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
repository: cluntop/tvbox
|
||||
token: ${{ secrets.GIT_TOKEN }}
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Run AI inference
|
||||
id: inference
|
||||
uses: actions/ai-inference@v2
|
||||
with:
|
||||
prompt: |
|
||||
Summarize the following GitHub issue in one paragraph:
|
||||
Title: ${{ github.event.issue.title }}
|
||||
Body: ${{ github.event.issue.body }}
|
||||
|
||||
- name: Comment with AI summary
|
||||
run: |
|
||||
gh issue comment $ISSUE_NUMBER --body '${{ steps.inference.outputs.response }}'
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
ISSUE_NUMBER: ${{ github.event.issue.number }}
|
||||
RESPONSE: ${{ steps.inference.outputs.response }}
|
||||
Executable
+79
@@ -0,0 +1,79 @@
|
||||
name: Upstream Sync
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
actions: write
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 * * * *"
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
upstream_branch:
|
||||
description: "上游仓库分支"
|
||||
required: true
|
||||
default: "main"
|
||||
type: string
|
||||
target_branch:
|
||||
description: "目标仓库分支"
|
||||
required: true
|
||||
default: "main"
|
||||
type: string
|
||||
sync_strategy:
|
||||
description: "同步策略"
|
||||
required: true
|
||||
default: "discard"
|
||||
type: choice
|
||||
options:
|
||||
- discard # 强制同步:丢弃本地修改,完全复制上游 (推荐)
|
||||
- merge # 尝试合并:如果有冲突会报错
|
||||
|
||||
env:
|
||||
UPSTREAM_REPO: "cluntop/tvbox"
|
||||
UPSTREAM_BRANCH: ${{ github.event.inputs.upstream_branch || 'main' }}
|
||||
TARGET_BRANCH: ${{ github.event.inputs.target_branch || 'main' }}
|
||||
SYNC_STRATEGY: ${{ github.event.inputs.sync_strategy || 'discard' }}
|
||||
|
||||
jobs:
|
||||
sync_upstream:
|
||||
name: Sync and Notify
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event.repository.fork }}
|
||||
|
||||
steps:
|
||||
- name: Checkout Target Repo
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
ref: ${{ env.TARGET_BRANCH }}
|
||||
repository: cluntop/tvbox
|
||||
token: ${{ secrets.GIT_TOKEN }}
|
||||
persist-credentials: true
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Sync Upstream Changes
|
||||
id: sync
|
||||
uses: aormsby/Fork-Sync-With-Upstream-action@v3.4.1
|
||||
with:
|
||||
upstream_sync_repo: ${{ env.UPSTREAM_REPO }}
|
||||
upstream_sync_branch: ${{ env.UPSTREAM_BRANCH }}
|
||||
target_sync_branch: ${{ env.TARGET_BRANCH }}
|
||||
target_repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
upstream_pull_args: ${{ env.SYNC_STRATEGY == 'discard' && '--allow-unrelated-histories --force' || '' }}
|
||||
target_branch_push_args: ${{ env.SYNC_STRATEGY == 'discard' && '--force' || '' }}
|
||||
test_mode: false
|
||||
|
||||
- name: Generate Summary
|
||||
run: |
|
||||
echo "### 🔄 同步报告 (Sync Report)" >> $GITHUB_STEP_SUMMARY
|
||||
echo "| Metric | Value |" >> $GITHUB_STEP_SUMMARY
|
||||
echo "| :--- | :--- |" >> $GITHUB_STEP_SUMMARY
|
||||
echo "| **源仓库** | [${{ env.UPSTREAM_REPO }}](https://github.com/${{ env.UPSTREAM_REPO }}) |" >> $GITHUB_STEP_SUMMARY
|
||||
echo "| **结果** | ${{ steps.sync.outputs.sync_status == 'success' && '✅ 成功 (Success)' || '❌ 失败 (Failed)' }} |" >> $GITHUB_STEP_SUMMARY
|
||||
|
||||
- name: Delete Old Workflows
|
||||
uses: Mattraks/delete-workflow-runs@v2
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
repository: ${{ github.repository }}
|
||||
retain_days: 1
|
||||
keep_minimum_runs: 3
|
||||
Executable
+70
@@ -0,0 +1,70 @@
|
||||
name: Update data m3u
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
actions: write
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0,30 * * * *' # 每小时执行一次
|
||||
workflow_dispatch: # 允许手动触发
|
||||
|
||||
env:
|
||||
TZ: Asia/Shanghai
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
Update:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
repository: cluntop/tvbox
|
||||
token: ${{ secrets.GIT_TOKEN }}
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Delete old workflow runs
|
||||
uses: Mattraks/delete-workflow-runs@v2
|
||||
with:
|
||||
token: ${{ github.token }}
|
||||
repository: ${{ github.repository }}
|
||||
retain_days: 1
|
||||
keep_minimum_runs: 3
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: '3.10'
|
||||
cache: 'pip'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
if [ -f .github/requirements.txt ]; then pip install -r .github/requirements.txt; fi
|
||||
pip install pandas requests
|
||||
|
||||
- name: Run IPTV script
|
||||
run: |
|
||||
python py/get_iptv.py
|
||||
|
||||
- name: Commit and Push changes
|
||||
run: |
|
||||
git config --global user.name "GitHub Actions"
|
||||
git config --global user.email "actions@github.com"
|
||||
|
||||
if [ -n "$(git status --porcelain)" ]; then
|
||||
echo "Changes detected, committing..."
|
||||
git add .
|
||||
git commit -m "Update m3u"
|
||||
|
||||
git pull --rebase origin main
|
||||
git push origin main
|
||||
else
|
||||
echo "No changes detected, skipping push."
|
||||
fi
|
||||
Executable
+90
@@ -0,0 +1,90 @@
|
||||
name: Update zip package
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
actions: write
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 * * * *' # 每小时运行一次
|
||||
workflow_dispatch: # 允许手动触发
|
||||
|
||||
env:
|
||||
TZ: Asia/Shanghai # 设置时区
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Delete old records
|
||||
uses: Mattraks/delete-workflow-runs@v2
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
repository: ${{ github.repository }}
|
||||
retain_days: 1
|
||||
keep_minimum_runs: 5
|
||||
|
||||
- name: Checkout target repo
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
repository: cluntop/tvbox
|
||||
token: ${{ secrets.GIT_TOKEN }}
|
||||
path: target-repo
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Process Xiaosa resource
|
||||
run: |
|
||||
echo "Starting Xiaosa download..."
|
||||
|
||||
mkdir -p temp_xiaosa
|
||||
cd temp_xiaosa
|
||||
wget --tries=3 --timeout=30 https://github.com/PizazzGY/NewTVBox/raw/main/%E5%8D%95%E7%BA%BF%E8%B7%AF.zip -O xiaosa.zip
|
||||
unzip -q xiaosa.zip
|
||||
mkdir -p ../target-repo/js/xiaosa
|
||||
|
||||
if [ -d "TVBoxOSC/tvbox" ]; then
|
||||
cp -rf TVBoxOSC/tvbox/* ../target-repo/js/xiaosa/
|
||||
echo "Xiaosa files copied successfully."
|
||||
else
|
||||
echo "Error: Xiaosa source directory structure changed."
|
||||
ls -R
|
||||
fi
|
||||
|
||||
cd ..
|
||||
rm -rf temp_xiaosa
|
||||
|
||||
- name: Process Source Repo
|
||||
run: |
|
||||
git clone --depth 1 https://github.com/fish2018/PG.git source-repo
|
||||
|
||||
cd source-repo
|
||||
ZIP_FILE=$(find . -type f -name "pg.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9].zip" | sort -r | head -n 1)
|
||||
|
||||
if [ -z "$ZIP_FILE" ]; then
|
||||
echo "Warning: No matching zip file found in Source Repo."
|
||||
else
|
||||
echo "Found zip file: $ZIP_FILE"
|
||||
|
||||
unzip -o "$ZIP_FILE" -x "README.txt" -d ../target-repo/
|
||||
echo "PG zip extracted to target repo."
|
||||
fi
|
||||
|
||||
- name: Commit and push changes
|
||||
working-directory: target-repo
|
||||
run: |
|
||||
git config user.name "GitHub Actions Bot"
|
||||
git config user.email "actions@github.com"
|
||||
|
||||
git add .
|
||||
|
||||
if git diff --staged --quiet; then
|
||||
echo "No changes to commit."
|
||||
exit 0
|
||||
else
|
||||
COMMIT_MSG="Update zip"
|
||||
git commit -m "$COMMIT_MSG"
|
||||
|
||||
git push origin HEAD:main
|
||||
echo "Changes pushed successfully."
|
||||
fi
|
||||
Reference in New Issue
Block a user