Files
avtv-20260929054004/.github/workflows/update.yml
T

40 lines
912 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: Update IPTV Playlist
on:
schedule:
# 每天 UTC 02:00(北京时间 10:00)
- cron: "0 2 * * *"
workflow_dispatch:
permissions:
contents: write
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: pip install -r requirements.txt
- name: Run AVTV
run: python main.py
- name: Commit and push
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add output/avtv.m3u
if git diff --cached --quiet; then
echo "No changes"
else
git commit -m "chore: update playlist $(date -u +%Y-%m-%d)"
git push
fi