M3U order sorting & house keeping

This commit is contained in:
SpaceMonkey 2025-01-28 22:50:37 +00:00
parent 026b25aa2d
commit 52da7a17be
3 changed files with 80 additions and 3 deletions

View file

@ -1,4 +1,4 @@
name: M3U Lint
name: M3U Lint and Sort
on:
push:
@ -6,7 +6,7 @@ on:
- 'mystique.m3u'
jobs:
lint:
lint-and-sort:
runs-on: docker
steps:
@ -20,5 +20,15 @@ jobs:
- name: Install m3u-linter
run: npm install -g m3u-linter
- name: Sort M3U file
run: node .forgejo/scripts/sort-m3u.js mystique.m3u
- name: Run M3U linter
run: m3u-linter mystique.m3u
run: m3u-linter --config .forgejo/scripts/m3u-linter.config.json mystique.m3u
- name: Commit changes if file was modified
run: |
git config --global user.name 'Forgejo Actions Bot'
git config --global user.email 'forgejo-actions[bot]@noreply.forgejo.org'
git add mystique.m3u
git diff --quiet && git diff --staged --quiet || (git commit -m "Sort M3U by group-title" && git push)