You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
iptv/.github/workflows/clean.yml

205 lines
4.0 KiB
YAML

4 years ago
name: clean
on:
workflow_dispatch:
4 years ago
schedule:
- cron: '0 6 * * 0'
4 years ago
jobs:
3 years ago
test:
4 years ago
runs-on: ubuntu-latest
4 years ago
continue-on-error: true
4 years ago
strategy:
4 years ago
fail-fast: false
4 years ago
matrix:
4 years ago
country: [
4 years ago
ad,
ae,
af,
4 years ago
al,
4 years ago
am,
ao,
ar,
at,
au,
aw,
4 years ago
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,
4 years ago
zm
# unsorted
4 years ago
]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Dependencies
run: npm install
- name: Remove Broken Links
4 years ago
run: node scripts/clean.js --country=${{ matrix.country }} --debug
4 years ago
- name: Upload Artifact
uses: actions/upload-artifact@v2
4 years ago
with:
4 years ago
name: channels
4 years ago
path: channels/${{ matrix.country }}.m3u
4 years ago
pull-request:
3 years ago
needs: test
4 years ago
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
4 years ago
- name: Download Artifacts
uses: actions/download-artifact@v2
4 years ago
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
title: '[Bot] Remove broken links'
body: |
4 years ago
This pull request is created automatically with `scripts/clean.js`.
4 years ago
The script checks each link and removes only those that return a HTTP 404 code (Not Found). Also, the script ignores links with labels `[Geo-blocked]` and `[Not 24/7]` in the title.
4 years ago
4 years ago
**IMPORTANT:** Before merging all links should be checked manually to make sure that the response from the server has not changed.
4 years ago
commit-message: '[Bot] Update playlists'
4 years ago
branch: bot/remove-broken-links
delete-branch: true