Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Sync with SEAL blocklists

on: workflow_dispatch

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
sync:
runs-on: ubuntu-latest

steps:
- name: Checkout eth-phishing-detect
uses: actions/checkout@v4
with:
path: eth-phishing-detect

- name: Checkout blocklists
uses: actions/checkout@v4
with:
repository: security-alliance/blocklists
path: blocklists

- name: Sync
run: |
cd $GITHUB_WORKSPACE/eth-phishing-detect

cat $GITHUB_WORKSPACE/blocklists/domain.txt $GITHUB_WORKSPACE/blocklists/ip.txt $GITHUB_WORKSPACE/blocklists/ipfs.txt \
| grep -v '^$' \
| jq --raw-input . \
| jq --slurpfile newBlacklist /dev/stdin '. + {blacklist: $newBlacklist}' src/config.json \
> temp.json

mv temp.json src/config.json

git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"

git commit -am "sync blocklist"

git push