merge psl-json #1
This file contains 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: PSL | |
on: | |
push: | |
branches: [main] | |
paths: | |
- "list/*" | |
- "scripts/*" | |
- ".github/workflows/main.yml" | |
schedule: | |
- cron: "0 0 * * *" | |
workflow_dispatch: | |
jobs: | |
convert: | |
name: Convert | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
- run: mkdir -p list | |
- name: Download public_suffix_list.dat | |
run: curl -o list/public_suffix_list.dat https://publicsuffix.org/list/public_suffix_list.dat | |
- name: Convert public_suffix_list.dat to JSON | |
run: node scripts/json.js | |
- name: Minify public_suffix_list.dat | |
run: node scripts/minify.js | |
- run: rm list/public_suffix_list.dat | |
- name: Commit | |
run: | | |
git config --global user.name "GitHub Actions" | |
git config --global user.email "[email protected]" | |
git add list/* | |
git pull --rebase | |
git commit --allow-empty -m "chore: convert PSL to different formats" | |
git push |