init
This commit is contained in:
commit
6e1c25caa4
16 changed files with 80378 additions and 0 deletions
48
.github/workflows/epg.yml
vendored
Normal file
48
.github/workflows/epg.yml
vendored
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
name: fetch epg
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "30 2,10,18 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
epg-fetcher:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Cache venv
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: .venv
|
||||
key: shared-venv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
|
||||
restore-keys: |
|
||||
shared-venv-${{ runner.os }}-
|
||||
|
||||
- name: Install uv
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
version: "latest"
|
||||
enable-cache: true
|
||||
ignore-nothing-to-cache: true
|
||||
cache-dependency-glob: "uv.lock"
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version-file: "pyproject.toml"
|
||||
|
||||
- name: Fetch EPG
|
||||
run: uv run EPG/fetch.py
|
||||
|
||||
- name: Push changes
|
||||
uses: stefanzweifel/git-auto-commit-action@v6
|
||||
with:
|
||||
commit_message: "update EPG"
|
||||
file_pattern: "EPG/TV.xml"
|
||||
commit_author: "GitHub Actions Bot <actions@github.com>"
|
||||
commit_user_name: "GitHub Actions Bot"
|
||||
commit_user_email: "actions@github.com"
|
||||
27
.github/workflows/health.yml
vendored
Normal file
27
.github/workflows/health.yml
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
name: health check
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 2,8,14,20 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
health-check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Run health.sh
|
||||
run: bash health.sh
|
||||
|
||||
- name: Update log
|
||||
uses: stefanzweifel/git-auto-commit-action@v6
|
||||
with:
|
||||
commit_message: "health log"
|
||||
file_pattern: "readme.md"
|
||||
commit_author: "GitHub Actions Bot <actions@github.com>"
|
||||
commit_user_name: "GitHub Actions Bot"
|
||||
commit_user_email: "actions@github.com"
|
||||
56
.github/workflows/m3u8.yml
vendored
Normal file
56
.github/workflows/m3u8.yml
vendored
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
name: fetch m3u8
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 * * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
m3u8-fetcher:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check time
|
||||
run: |
|
||||
hour=$(TZ=America/New_York date +%-H)
|
||||
|
||||
if [ "$hour" -lt 8 ] || [ "$hour" -gt 23 ]; then
|
||||
exit 78
|
||||
fi
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Cache venv
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: .venv
|
||||
key: shared-venv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
|
||||
restore-keys: |
|
||||
shared-venv-${{ runner.os }}-
|
||||
|
||||
- name: Install uv
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
version: "latest"
|
||||
enable-cache: true
|
||||
ignore-nothing-to-cache: true
|
||||
cache-dependency-glob: "uv.lock"
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version-file: "pyproject.toml"
|
||||
|
||||
- name: Fetch M3U8
|
||||
run: uv run M3U8/fetch.py
|
||||
|
||||
- name: Push changes
|
||||
uses: stefanzweifel/git-auto-commit-action@v6
|
||||
with:
|
||||
commit_message: "update M3U8"
|
||||
file_pattern: "M3U8/TV.m3u8 M3U8/scrape/tvpass.json"
|
||||
commit_author: "GitHub Actions Bot <actions@github.com>"
|
||||
commit_user_name: "GitHub Actions Bot"
|
||||
commit_user_email: "actions@github.com"
|
||||
Loading…
Add table
Add a link
Reference in a new issue