mirror of
https://github.com/lalifeier/IPTV.git
synced 2025-12-16 23:10:57 +08:00
51 lines
1.2 KiB
YAML
51 lines
1.2 KiB
YAML
name: Auto Update Hotel IPTV
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: "15 6,12,18,22 * * *"
|
|
|
|
jobs:
|
|
iptv:
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions: write-all
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 1
|
|
|
|
- name: Set up Python 3.11
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: 3.11
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
pip install -r requirements.txt && playwright install && playwright install-deps
|
|
|
|
- name: Get Currrent Date
|
|
run: echo "DATE=$(date +'%Y-%m-%d %H:%M:%S %Z')" >> $GITHUB_ENV
|
|
|
|
- name: Run Update Hotel IPTV
|
|
run: |
|
|
python main.py --type hotel --playlist
|
|
|
|
- name: Git Auto Commit
|
|
uses: stefanzweifel/git-auto-commit-action@v5
|
|
with:
|
|
commit_message: Auto Update IPTV
|
|
branch: main
|
|
push_options: '--force'
|
|
|
|
- name: Delete workflow runs
|
|
uses: MajorScruffy/delete-old-workflow-runs@v0.3.0
|
|
with:
|
|
repository: ${{ github.repository }}
|
|
workflow: ".github/workflows/iptv_hotel_playlist.yml"
|
|
older-than-seconds: 3600
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|