iptv/.github/workflows/clean.yml

211 lines
4.2 KiB
YAML
Raw Normal View History

2021-05-06 14:57:50 +02:00
name: clean
on:
workflow_dispatch:
schedule:
- cron: '0 6 * * 0'
jobs:
2021-05-06 17:29:20 +02:00
update:
2021-05-06 14:57:50 +02:00
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
2021-05-06 17:02:52 +02:00
country: [
2021-05-06 18:04:57 +02:00
ad,
2021-05-06 18:08:10 +02:00
# ae,
af
2021-05-06 17:42:13 +02:00
# al,
# am,
# ao,
# ar
2021-05-06 17:02:52 +02:00
# 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
2021-05-06 14:57:50 +02:00
]
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v2
2021-05-06 17:42:13 +02:00
- name: Create Branch
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git checkout -b 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: |
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:26:21 +02:00
- name: Pull Remote
run: |
2021-05-06 18:29:18 +02:00
git config pull.ff only
2021-05-06 18:26:21 +02:00
git pull origin bot/patch-1
2021-05-06 18:19:58 +02:00
- name: Push Changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: bot/patch-1
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.