fix(list): Repair PhishTank filter #72
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: Update Lists | |
| on: | |
| push: | |
| paths: | |
| - "data/v2/manifest.json" | |
| workflow_dispatch: | |
| permissions: read-all | |
| jobs: | |
| publish_manifest: | |
| runs-on: ubuntu-22.04 | |
| defaults: | |
| run: | |
| shell: bash | |
| permissions: | |
| contents: write | |
| container: | |
| image: ghcr.io/t145/black-mirror:latest | |
| credentials: | |
| username: ${{ github.actor }} | |
| password: ${{ github.token }} | |
| options: --user root | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 | |
| - name: Document manifest | |
| run: | | |
| # shellcheck disable=SC2016 | |
| jaq -r '["Source", "Method", "Description", "Homepage", "License"], (to_entries[] | .key as $key | .value.method as $method | .value.metadata | [$key, $method, .description, .homepage, .license]) | @csv' data/v2/manifest.json | csvlook >dist/SOURCES.md | |
| - name: Document AdGuard sources | |
| run: jaq -r '.[] | select(.method == "BLOCK" and .variants.adguard?) | ("!#include " + .variants.adguard)' data/v2/manifest.json >dist/ADGUARD_SOURCES.txt | |
| - name: Whitelist list hosts | |
| run: | | |
| jaq -r '[ .[].mirrors[] | capture("^((?<scheme>[^:/?#]+):)?(//(?<authority>(?<domain>[^/?#:]*)))?").domain ] | unique | sort | .[]' data/v2/manifest.json | | |
| dnsx -nc -silent -cname -ns -resp | | |
| mawk '{print $1; gsub(/[\[\]]/,"",$3); print $3}' >>dist/CONTRIB_DOMAINS.txt | |
| sort -o dist/CONTRIB_DOMAINS.txt -u dist/CONTRIB_DOMAINS.txt | |
| - name: Make commit directory safe | |
| run: git config --global --add safe.directory /__w/black-mirror/black-mirror | |
| - name: Commit changes | |
| uses: stefanzweifel/git-auto-commit-action@0b492c0d951b87f3cd12523a542dbd156c1dbc80 | |
| with: | |
| commit_message: "ci(lists): ✨📚✨" |