-
Notifications
You must be signed in to change notification settings - Fork 6
53 lines (53 loc) · 1.5 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Generate TV playlist and EPG
on:
schedule:
- cron: "0 * * * *"
workflow_dispatch:
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 21
cache: "npm"
- name: Generate files
run: |
npm install
npm run start
git clone --depth 1 -b master https://github.com/iptv-org/epg.git
cd epg
npm install
npm run grab -- --channels=../bin/channels.xml --output=../bin/guide.xml
cd ..
rm -rf epg
- name: Install ffprobe
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: ffmpeg
version: 1.0
- name: Install linuxbrew
uses: Homebrew/actions/setup-homebrew@master
- name: Install m3u-checker and ffprobe
run: |
brew install ghokun/tap/m3u-checker
- name: Probe streams
run: |
cd bin
m3u-checker --playlist playlist.m3u --file REPORT.md
- name: Commit and push
run: |
if [ -z "$(git status --porcelain)" ]; then
echo "No changes"
else
git config --global user.name github-actions
git config --global user.email [email protected]
git add bin/*
git commit -m "Update playlist and EPG"
git push
fi