run.yml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. name: Update xiaosa
  2. on:
  3. workflow_dispatch:
  4. schedule:
  5. - cron: "30 2 * * *"
  6. push:
  7. branches:
  8. - master
  9. paths-ignore:
  10. - "**/README.md"
  11. jobs:
  12. build:
  13. runs-on: ubuntu-latest
  14. steps:
  15. - name: Checkout the branch
  16. uses: actions/checkout@v4
  17. - name: wget the xiaosa
  18. run: |
  19. pwd
  20. cd xiaosa/
  21. wget https://jihulab.com/fourd/FourD/-/raw/main/local/%E5%8D%95%E7%BA%BF%E8%B7%AF.zip -O xiaosa.zip
  22. unzip xiaosa.zip
  23. \cp -pdr TVBoxOSC/tvbox/* ./
  24. rm -rf xiaosa.zip TVBoxOSC
  25. shell: bash
  26. # - name: Move files to publish directory
  27. # run: |
  28. # mkdir -p publish
  29. # \cp *.txt ./publish/
  30. - name: Git push assets to "release" branch
  31. run: |
  32. git config --local user.name "github-actions[bot]"
  33. git config --local user.email "87984115+github-actions[bot]@users.noreply.github.com"
  34. git add .
  35. if ! git diff-index --quiet HEAD --; then
  36. git commit -m "潇洒更新 $(date +%Y%m%d%H%M)"
  37. git push -f origin master
  38. else
  39. echo "没有文件更新,不执行 git push"
  40. fi