iptv/.github/workflows/clean.yml
2021-05-06 19:29:18 +03:00

211 lines
4.2 KiB
YAML

name: clean
on:
workflow_dispatch:
schedule:
- cron: '0 6 * * 0'
jobs:
update:
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
country: [
ad,
# ae,
af
# 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,
# unsorted
]
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Create Branch
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git checkout -b bot/patch-1
- name: Install Dependencies
run: npm install
- name: Remove Broken Links
run: node scripts/clean.js --country=${{ matrix.country }}
- name: Commit Changes
run: |
git add .
git diff-index --quiet HEAD || git commit -m "[Bot] Update ${{ matrix.country }}.m3u"
- name: Pull Remote
run: |
git config pull.ff only
git pull origin bot/patch-1
- name: Push Changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: bot/patch-1
# 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.