iptv/.github/workflows/clean.yml

206 lines
4.1 KiB
YAML
Raw Normal View History

2021-05-06 14:57:50 +02:00
name: clean
on:
workflow_dispatch:
jobs:
2021-05-06 17:29:20 +02:00
update:
2021-05-06 14:57:50 +02:00
runs-on: ubuntu-latest
strategy:
matrix:
2021-05-06 17:02:52 +02:00
country: [
2021-05-06 19:18:05 +02:00
ad
# ae,
# af,
# al,
# am,
# ao,
# ar,
# at
2021-05-06 17:02:52 +02:00
# 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,
# unsorted
2021-05-06 14:57:50 +02:00
]
2021-05-06 19:18:05 +02:00
max-parallel: 2
2021-05-06 14:57:50 +02:00
steps:
2021-05-06 19:26:51 +02:00
- name: Create Branch
uses: peterjgrainger/action-create-branch@v2.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
branch: 'bot/patch-1'
2021-05-06 14:57:50 +02:00
- name: Checkout
uses: actions/checkout@v2
2021-05-06 19:10:05 +02:00
with:
ref: bot/patch-1
2021-05-06 14:57:50 +02:00
- name: Install Dependencies
run: npm install
- name: Remove Broken Links
run: node scripts/clean.js --country=${{ matrix.country }}
2021-05-06 17:29:20 +02:00
- name: Commit Changes
run: |
2021-05-06 19:10:05 +02:00
git config user.name github-actions
git config user.email github-actions@github.com
2021-05-06 17:29:20 +02:00
git add .
2021-05-06 18:21:37 +02:00
git diff-index --quiet HEAD || git commit -m "[Bot] Update ${{ matrix.country }}.m3u"
2021-05-06 18:45:55 +02:00
git pull
2021-05-06 18:54:36 +02:00
git push
2021-05-06 18:02:25 +02:00
# create-pr:
# runs-on: ubuntu-latest
# needs: update
# steps:
# - name: Checkout
# uses: actions/checkout@v2
# with:
# ref: bot/remove-broken-links
# - name: Create Pull Request
# uses: peter-evans/create-pull-request@v3
# with:
# title: '[Bot] Remove broken links'
# body: |
# This pull request is created automatically.