Update.yml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. name: Update
  2. on:
  3. push:
  4. schedule:
  5. - cron: 0,30 * * * *
  6. env:
  7. TZ: Asia/Shanghai
  8. jobs:
  9. Update:
  10. runs-on: ubuntu-latest
  11. steps:
  12. - name: Checkout
  13. uses: actions/checkout@v4
  14. - name: GetTime
  15. run: echo "GET_TIME=$(date +'%Y-%m-%d %H:%M:%S CST')" >> $GITHUB_ENV
  16. - name: Update
  17. run: |
  18. # 央视源
  19. rm -f CCTV.m3u && wget https://raw.githubusercontent.com/fanmingming/live/main/tv/m3u/ipv6.m3u -O CCTV.m3u
  20. sed -i -n '/央视/,+1p' CCTV.m3u
  21. sed -i '1i #EXTM3U' CCTV.m3u
  22. sed -i '/^\s*$/d' CCTV.m3u
  23. # 卫视源
  24. rm -f CNTV.m3u && touch CNTV.m3u
  25. wget https://raw.githubusercontent.com/fanmingming/live/main/tv/m3u/ipv6.m3u -O CNTV1.m3u && sed -i -n '/卫视/,+1p' CNTV1.m3u
  26. wget https://raw.githubusercontent.com/fanmingming/live/main/tv/m3u/ipv6.m3u -O CNTV2.m3u && sed -i -n '/数字/,+1p' CNTV2.m3u
  27. wget https://raw.githubusercontent.com/fanmingming/live/main/tv/m3u/ipv6.m3u -O CNTV3.m3u && sed -i -n '/百视/,+1p' CNTV3.m3u
  28. cat CNTV1.m3u >> CNTV.m3u
  29. cat CNTV2.m3u >> CNTV.m3u
  30. cat CNTV3.m3u >> CNTV.m3u
  31. rm -f CNTV1.m3u CNTV2.m3u CNTV3.m3u
  32. sed -i '1i #EXTM3U' CNTV.m3u
  33. sed -i '/^\s*$/d' CNTV.m3u
  34. # 成人源
  35. rm -f Adult.m3u && wget http://adultiptv.net/chs.m3u -O Adult.m3u
  36. sed -i -n '/XXX/,+1p' Adult.m3u
  37. sed -i 's/XXX/成人频道/' Adult.m3u
  38. sed -i 's/AdultIPTV.net //g' Adult.m3u
  39. # wget https://raw.githubusercontent.com/YanG-1989/m3u/main/Adult.m3u -O AdultVideo.txt
  40. # sed -i -n '/日本/,+1p' AdultVideo.txt
  41. # sed -i 's/日本/成人视频/' AdultVideo.txt
  42. # echo '' >> Adult.m3u && cat AdultVideo.txt >> Adult.m3u
  43. # rm -f AdultVideo.txt
  44. sed -i '/^\s*$/d' Adult.m3u
  45. # 整合源
  46. rm -f IPTV.m3u && touch IPTV.m3u
  47. cat CCTV.m3u >> IPTV.m3u
  48. cat CNTV.m3u >> IPTV.m3u
  49. cat Adult.m3u >> IPTV.m3u
  50. sed -i '/#EXTM3U/d' IPTV.m3u
  51. sed -i '1i #EXTM3U' IPTV.m3u
  52. sed -i '/^\s*$/d' IPTV.m3u
  53. # 节目源
  54. rm -f EPG.xml && wget https://epg.112114.xyz/pp.xml -O EPG.xml
  55. echo "Auto Update IPTV in ${GET_TIME}" > README.md
  56. - name: Clean
  57. run: |
  58. git config --local user.email "github-actions[bot]@users.noreply.github.com"
  59. git config --local user.name "github-actions[bot]"
  60. git checkout --orphan latest_branch
  61. git add -A
  62. git commit -am "${GET_TIME}"
  63. git branch -D Files
  64. git branch -m Files
  65. - name: Push
  66. run: git push -f origin Files