gh workflow
This commit is contained in:
parent
a76f2205ff
commit
e47195b096
28
.github/workflows/update.yml
vendored
Normal file
28
.github/workflows/update.yml
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
name: Pull latest data from Mojang API
|
||||
|
||||
on:
|
||||
push:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '25 */6 * * *'
|
||||
|
||||
jobs:
|
||||
scheduled:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out this repo
|
||||
uses: actions/checkout@v2
|
||||
- name: Fetch latest data
|
||||
run: |-
|
||||
node update_blocklist.js
|
||||
- name: Generate todo.txt
|
||||
run: |-
|
||||
comm -23 <(sort -u data/current.txt) <(awk -F= '{print $1}' data/identified.txt |sort -u) | sort -u > data/todo.txt
|
||||
- name: Commit and push if it changed
|
||||
run: |-
|
||||
git config user.name "Automated"
|
||||
git config user.email "actions@users.noreply.github.com"
|
||||
git add -A
|
||||
timestamp=$(date -u)
|
||||
git commit -m "Blocklist updated: ${timestamp}" || exit 0
|
||||
git push
|
@ -7,7 +7,7 @@ I figured I'd try to get a more comprehensive list of the domains blocked by Moj
|
||||
Get a list of TLDs (idk if this is super up to date)
|
||||
|
||||
```
|
||||
curl -s https://raw.githubusercontent.com/umpirsky/tld-list/master/data/en/tld.txt|awk '{print $1}' > tld.txt
|
||||
curl -s https://raw.githubusercontent.com/umpirsky/tld-list/master/data/en/tld.txt|grep -Po "\(\K.+?(?=\))" > tld.txt
|
||||
```
|
||||
|
||||
Get the middle segment (part before the TLD) of all entries, excluding ddns.net, spit it out as *.string
|
||||
|
Loading…
x
Reference in New Issue
Block a user