separate manifests

This commit is contained in:
Obelous 2026-03-07 12:49:46 +00:00
parent 28914fac33
commit 2ecf69e128
7 changed files with 81 additions and 39 deletions

30
.github/workflows/format-lists.yml vendored Normal file
View file

@ -0,0 +1,30 @@
name: Format Sources Lists
on:
pull_request:
paths:
- 'sources.txt'
- 'sourcesnsfw.txt'
workflow_dispatch:
jobs:
format:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref || github.ref }}
- name: Sort and remove duplicates
run: |
LC_ALL=C sort -u -o sources.txt sources.txt
LC_ALL=C sort -u -o sourcesnsfw.txt sourcesnsfw.txt
- name: Commit changes
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add sources.txt sourcesnsfw.txt
git diff --quiet && git diff --staged --quiet || (git commit -m "Auto-format sources lists: sort and remove duplicates" && git push)

View file

@ -2,7 +2,7 @@ name: Manifest updater
on:
push:
branches: [ main ]
branches: [ main, testing ]
schedule:
- cron: '0 0 * * *'
@ -21,6 +21,6 @@ jobs:
- run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add manifest.json images/
git add manifest.json manifestnsfw.json images/
git commit -m "Generate manifest" || exit 0
git push