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@v7 # - 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 pycryptodome requests --break-system-packages python tvbox.py https://9877.kstore.space/ONE/one.json xs.json dec python build_local.py xs.json output \cp -pdr output/* ../xiaosa/ 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 output xs.json cd ../ shell: bash - name: Upload xiaosa artifacts uses: actions/upload-artifact@v7 with: name: xiaosa-output path: | dianshi.json jsm.json jar/spider.jar xiaosa/ XBPQ/ XYQHiker/ json/ py/ js/ fty: runs-on: ubuntu-latest continue-on-error: true steps: - name: Checkout the branch uses: actions/checkout@v7 - name: fty tools run: | pwd cd tools/ pip install demjson3 pycryptodome requests --break-system-packages python tvbox.py https://www.xn--sss604efuw.net/tv ty.json dec python fty.py ty.json # 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 ty.json cd ../ shell: bash - name: Upload fty artifacts uses: actions/upload-artifact@v7 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@v7 - name: Download xiaosa artifacts uses: actions/download-artifact@v8 with: name: xiaosa-output continue-on-error: true - name: Download fty artifacts uses: actions/download-artifact@v8 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