2025-01-28 22:50:37 +00:00
|
|
|
name: M3U Lint and Sort
|
2025-01-28 17:50:00 -03:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths:
|
|
|
|
- 'mystique.m3u'
|
|
|
|
|
|
|
|
jobs:
|
2025-01-28 22:50:37 +00:00
|
|
|
lint-and-sort:
|
2025-01-28 17:50:00 -03:00
|
|
|
runs-on: docker
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
|
|
|
|
- name: Setup Node.js
|
|
|
|
uses: actions/setup-node@v4
|
|
|
|
with:
|
|
|
|
node-version: '20'
|
2025-01-29 18:21:16 +00:00
|
|
|
|
|
|
|
- name: Basic M3U cleanup
|
|
|
|
run: node .forgejo/scripts/cleanup-m3u.js mystique.m3u
|
2025-01-28 17:50:00 -03:00
|
|
|
|
2025-02-15 18:40:33 -03:00
|
|
|
- name: Sort M3U file
|
|
|
|
run: node .forgejo/scripts/sort-m3u.js mystique.m3u
|
2025-01-29 22:59:35 +00:00
|
|
|
|
2025-02-01 00:19:37 +00:00
|
|
|
- name: Split into country playlists
|
2025-02-15 23:42:13 +00:00
|
|
|
run: node .forgejo/scripts/countries.js mystique.m3u
|
2025-01-29 22:59:35 +00:00
|
|
|
|
2025-02-01 00:19:37 +00:00
|
|
|
- name: Split into cultural group playlists
|
|
|
|
run: node .forgejo/scripts/cultural-groups.js mystique.m3u
|
|
|
|
|
2025-01-30 22:47:58 +00:00
|
|
|
- name: Update README
|
|
|
|
run: node .forgejo/scripts/readme-m3u.js mystique.m3u
|
|
|
|
|
|
|
|
|
2025-01-29 20:12:43 -03:00
|
|
|
- name: Commit changes to files
|
2025-01-29 22:59:35 +00:00
|
|
|
run: |
|
|
|
|
git config --global user.name 'Forgejo Actions Bot'
|
|
|
|
git config --global user.email 'forgejo-actions[bot]@noreply.forgejo.org'
|
2025-01-30 22:47:58 +00:00
|
|
|
git add --all
|
2025-01-29 20:12:43 -03:00
|
|
|
git diff --quiet && git diff --staged --quiet || (git commit -m "Automated updates of M3U Files" && git push)
|
2025-01-29 22:59:35 +00:00
|
|
|
|