Add vivantis.motozemcz.com (#1133) #559
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Sort Lists | |
| on: | |
| push: | |
| branches: | |
| - master | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| sort: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout the repo (if push) | |
| if: github.event_name == 'push' | |
| uses: actions/checkout@main | |
| - name: Checkout the repo (if pull request) | |
| if: github.event_name == 'pull_request' | |
| uses: actions/checkout@main | |
| with: | |
| ref: ${{ github.head_ref }} | |
| - name: Install dependencies | |
| run: | | |
| sudo apt install -y gawk | |
| - name: Sort list | |
| run: | | |
| # Sort all .list files in the additions directory | |
| find ${{ github.workspace }}/additions -type f -iname "*.list" -exec sort -o {} {} \; | |
| # Sort all .list files in the falsepositives directory | |
| find ${{ github.workspace }}/falsepositives -type f -regextype posix-extended -iregex ".*\.(all|reg|rzdb)\.list" -exec awk -i inplace 'NR <= 5 { print; next } { print | "sort" }' {} \; | |
| find ${{ github.workspace }}/falsepositives -type f -regextype posix-extended -not -iregex ".*\.(all|reg|rzdb)\.list" -exec sort -o {} {} \; | |
| # Sort all .list files in the bypasses directory | |
| find ${{ github.workspace }}/bypasses -type f -regextype posix-extended -iregex ".*\.(all|reg|rzdb)\.list" -exec awk -i inplace 'NR <= 5 { print; next } { print | "sort" }' {} \; | |
| find ${{ github.workspace }}/bypasses -type f -regextype posix-extended -not -iregex ".*\.(all|reg|rzdb)\.list" -exec sort -o {} {} \; | |
| - name: Output changes | |
| run: git status | |
| - name: Push changes back to the repository | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add . | |
| git commit -a -m "Sort lists" || echo "No changes to commit" | |
| git push |