Create iptv.yml
This commit is contained in:
parent
49da8f6e46
commit
df7e3cfaf3
74
.github/workflows/iptv.yml
vendored
Normal file
74
.github/workflows/iptv.yml
vendored
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
name: Update-iptv
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: 0,30 * * * *
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
env:
|
||||||
|
TZ: Asia/Shanghai
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
Update:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Get time
|
||||||
|
run: echo "DATE=$(date +'%Y-%m-%d %H:%M:%S')" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: '3.x'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install pandas requests
|
||||||
|
|
||||||
|
- name: Run script
|
||||||
|
run: |
|
||||||
|
python iptv.py
|
||||||
|
|
||||||
|
- name: Update time
|
||||||
|
run: |
|
||||||
|
echo "## ✨于 $DATE 更新
|
||||||
|
## 🎉最新可用IPTV源,觉得好用请点个Star吧!这对我非常重要!
|
||||||
|
### 🎈用法如下
|
||||||
|
**安装一个IPTV客户端(其它平台上有相关教程)**
|
||||||
|
|
||||||
|
**IPTV源网址(TXT)** https://ghfast.top/raw.githubusercontent.com/alantang1977/X/main/iptv.txt
|
||||||
|
|
||||||
|
**IPTV源网址(M3U)** https://ghfast.top/raw.githubusercontent.com/alantang1977/X/main/iptv.m3u
|
||||||
|
|
||||||
|
" > READMEbak.md
|
||||||
|
|
||||||
|
- name: List files in workspace
|
||||||
|
run: ls -la
|
||||||
|
|
||||||
|
- name: Git status
|
||||||
|
run: git status
|
||||||
|
|
||||||
|
- name: Configure Git
|
||||||
|
run: |
|
||||||
|
git config --global user.name "github-actions[bot]"
|
||||||
|
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
|
|
||||||
|
- name: Commit and Push changes
|
||||||
|
run: |
|
||||||
|
git add $(pwd)/iptv.txt
|
||||||
|
git add $(pwd)/iptv.m3u
|
||||||
|
git add $(pwd)/README.md
|
||||||
|
git commit -m "Update on $DATE" --allow-empty
|
||||||
|
git push origin main
|
||||||
|
- name: Upload streams file
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: iptv
|
||||||
|
path: iptv.txt
|
Loading…
Reference in New Issue
Block a user