mirror of
https://github.com/0belous/universal-plugin-repo.git
synced 2026-03-22 09:46:54 -03:00
30 lines
No EOL
846 B
YAML
30 lines
No EOL
846 B
YAML
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) |