mirror of
https://github.com/qist/tvbox.git
synced 2026-06-21 17:15:17 +00:00
117 lines
3.2 KiB
YAML
117 lines
3.2 KiB
YAML
name: Update xiaosa
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: "20 5 * * *"
|
|
push:
|
|
branches:
|
|
- master
|
|
paths:
|
|
- "tools/**"
|
|
jobs:
|
|
xiaosa:
|
|
runs-on: ubuntu-latest
|
|
continue-on-error: true
|
|
steps:
|
|
- name: Checkout the branch
|
|
uses: actions/checkout@v6
|
|
|
|
- name: wget the xiaosa
|
|
run: |
|
|
pwd
|
|
cd xiaosa/
|
|
wget https://raw.githubusercontent.com/PizazzGY/NewTVBox/main/local/%E5%8D%95%E7%BA%BF%E8%B7%AF.zip -O xiaosa.zip
|
|
unzip xiaosa.zip
|
|
\cp -pdr TVBoxOSC/tvbox/* ./
|
|
rm -rf xiaosa.zip TVBoxOSC
|
|
cd ../
|
|
shell: bash
|
|
- name: xiaosa tools
|
|
run: |
|
|
pwd
|
|
cd tools/
|
|
pip install demjson3 --break-system-packages
|
|
python xiao.py ../xiaosa/api.json dianshi.json
|
|
python xiao.py ../xiaosa/api.json jsm.json
|
|
python copy_xbpq.py dianshi_with_app_sites.json
|
|
\cp -pdr dianshi_with_app_sites.json ../dianshi.json
|
|
\cp -pdr jsm_with_app_sites.json ../jsm.json
|
|
\cp -pdr ../xiaosa/spider.jar ../jar/spider.jar
|
|
rm -rf dianshi_with_app_sites.json jsm_with_app_sites.json
|
|
cd ../
|
|
shell: bash
|
|
- name: Upload xiaosa artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: xiaosa-output
|
|
path: |
|
|
dianshi.json
|
|
jsm.json
|
|
jar/spider.jar
|
|
xiaosa/
|
|
XBPQ/
|
|
XYQHiker/
|
|
py/
|
|
js/
|
|
|
|
fty:
|
|
runs-on: ubuntu-latest
|
|
continue-on-error: true
|
|
steps:
|
|
- name: Checkout the branch
|
|
uses: actions/checkout@v6
|
|
|
|
- name: fty tools
|
|
run: |
|
|
pwd
|
|
cd tools/
|
|
pip install demjson3 --break-system-packages
|
|
python fty.py
|
|
\cp -pdr tvbox_cleaned.json ../fty.json
|
|
\cp -pdr fan.txt ../jar/fan.txt
|
|
git clone --depth=1 --recursive https://github.com/fantaiying7/EXT.git
|
|
\cp -pdr EXT/* ../FTY/
|
|
rm -rf tvbox_cleaned.json fan.txt EXT
|
|
cd ../
|
|
shell: bash
|
|
- name: Upload fty artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: fty-output
|
|
path: |
|
|
fty.json
|
|
jar/fan.txt
|
|
FTY/
|
|
|
|
git-push:
|
|
needs: [xiaosa, fty]
|
|
runs-on: ubuntu-latest
|
|
if: always()
|
|
steps:
|
|
- name: Checkout the branch
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Download xiaosa artifacts
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: xiaosa-output
|
|
continue-on-error: true
|
|
|
|
- name: Download fty artifacts
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: fty-output
|
|
continue-on-error: true
|
|
|
|
- name: Git push assets to "release" branch
|
|
run: |
|
|
git config --local user.name "github-actions[bot]"
|
|
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
|
git add .
|
|
if ! git diff-index --quiet HEAD --; then
|
|
git commit -m "更新源 $(date +%Y%m%d%H%M)"
|
|
git push -f origin master
|
|
else
|
|
echo "没有文件更新,不执行 git push"
|
|
fi
|