iptv/.github/workflows/auto-update.yml

238 lines
4.7 KiB
YAML
Raw Normal View History

2021-02-08 12:05:46 +01:00
name: auto-update
2021-02-08 11:53:24 +01:00
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
jobs:
2021-05-06 15:24:54 +02:00
remove-duplicates:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Dependencies
run: npm install
- name: Remove Duplicates
run: node scripts/remove-duplicates.js
- name: Commit Changes
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git add .
git diff-index --quiet HEAD || git commit -m "[Bot] Remove duplicates"
git pull
git push
2021-02-08 11:53:24 +01:00
format:
runs-on: ubuntu-latest
2021-05-06 15:24:54 +02:00
needs: remove-duplicates
2021-05-06 15:05:32 +02:00
continue-on-error: true
strategy:
2021-05-06 22:45:56 +02:00
fail-fast: false
2021-05-06 15:05:32 +02:00
matrix:
2021-05-06 15:50:15 +02:00
country:
[
2021-05-06 15:05:32 +02:00
ad,
ae,
af,
2021-05-06 15:50:15 +02:00
al,
am,
ao,
ar,
at,
au,
aw,
az,
ba,
bb,
bd,
be,
bf,
bg,
bh,
bn,
bo,
br,
bs,
by,
ca,
cd,
cg,
ch,
ci,
cl,
cm,
cn,
co,
cr,
cu,
cw,
cy,
cz,
de,
dk,
do,
dz,
ec,
ee,
eg,
es,
et,
fi,
fj,
fo,
fr,
ge,
gh,
gm,
gn,
gp,
gq,
gr,
gt,
hk,
hn,
hr,
ht,
hu,
id,
ie,
il,
in,
iq,
ir,
is,
it,
jm,
jo,
jp,
ke,
kg,
kh,
kp,
kr,
kw,
kz,
la,
lb,
li,
lk,
lt,
lu,
lv,
ly,
ma,
mc,
md,
me,
mk,
ml,
mm,
mn,
mo,
mt,
mx,
my,
mz,
ne,
ng,
nl,
no,
np,
nz,
om,
pa,
pe,
ph,
pk,
pl,
pr,
ps,
pt,
py,
qa,
ro,
rs,
ru,
rw,
sa,
sd,
se,
sg,
si,
sk,
sl,
sm,
sn,
so,
sv,
sy,
th,
tj,
tm,
tn,
tr,
tt,
tw,
tz,
ua,
ug,
uk,
us,
uy,
uz,
va,
ve,
vi,
vn,
xk,
ye,
zm
2021-05-06 15:05:32 +02:00
]
2021-02-08 11:53:24 +01:00
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Dependencies
run: npm install
- name: Format Playlists
2021-05-06 15:05:32 +02:00
run: node scripts/format.js --country=${{ matrix.country }}
2021-05-06 15:24:54 +02:00
- name: Commit Changes
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git add .
git diff-index --quiet HEAD || git commit -m "[Bot] Format ${{ matrix.country }}.m3u"
2021-05-06 15:37:33 +02:00
git pull
2021-05-06 15:24:54 +02:00
git push
2021-02-08 11:53:24 +01:00
generate:
runs-on: ubuntu-latest
2021-02-09 08:05:21 +01:00
needs: format
2021-02-08 11:53:24 +01:00
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Dependencies
run: npm install
- name: Generate Playlists
run: node scripts/generate.js
- name: Deploy to GitHub Pages
2021-04-17 02:47:33 +02:00
uses: JamesIves/github-pages-deploy-action@4.1.1
2021-04-17 02:53:32 +02:00
with:
branch: gh-pages
folder: .gh-pages
2021-02-08 11:53:24 +01:00
update-readme:
runs-on: ubuntu-latest
needs: generate
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Dependencies
run: npm install
- name: Update README.md
run: node scripts/update-readme.js
2021-02-09 08:05:21 +01:00
- name: Commit Changes
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git add .
git diff-index --quiet HEAD || git commit -m "[Bot] Update README.md"
git pull
2021-02-09 08:05:21 +01:00
git push