You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1.9 KiB

name: Update xiaosa
on:
workflow_dispatch:
schedule:
- cron: "20 5 * * *"
push:
branches:
- master
paths-ignore:
- "**/README.md"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout the branch
uses: actions/checkout@v6
- name: wget the xiaosa
run: |
pwd
cd xiaosa/
wget https://github.com/PizazzGY/NewTVBox/raw/main/%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: tools
run: |
pwd
cd tools/
pip install demjson3 --break-system-packages
python fty.py
python xiao.py ../xiaosa/api.json dianshi.json
python xiao.py ../xiaosa/api.json jsm.json
\cp -pdr tvbox_cleaned.json ../fty.json
\cp -pdr dianshi_with_app_sites.json ../dianshi.json
\cp -pdr jsm_with_app_sites.json ../jsm.json
\cp -pdr fan.txt ../jar/fan.txt
\cp -pdr ../xiaosa/spider.jar ../jar/spider.jar
git clone --depth=1 --recursive https://github.com/fantaiying7/EXT.git
\cp -pdr EXT/* ../FTY/
python copy_xbpq.py dianshi_with_app_sites.json
rm -rf dianshi_with_app_sites.json jsm_with_app_sites.json tvbox_cleaned.json fan.txt EXT
cd ../
shell: bash
- name: Git push assets to "release" branch
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "87984115+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