2022-08-24 21:32:05 +00:00
|
|
|
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
|
2023-01-11 16:35:23 +00:00
|
|
|
- name: Install needed node modules
|
|
|
|
run: |-
|
|
|
|
npm i
|
2022-08-24 21:32:05 +00:00
|
|
|
- name: Fetch latest data
|
|
|
|
run: |-
|
2022-09-05 19:16:47 +00:00
|
|
|
npm run update-blocklist
|
2022-08-24 21:32:05 +00:00
|
|
|
- name: Generate todo.txt
|
|
|
|
run: |-
|
2022-09-05 19:23:28 +00:00
|
|
|
comm -23 <(sort -u data/current.txt) <(awk -F= '{print $1}' data/identified.txt |sort -u) | sort -u > data/todo.txt
|
2023-01-11 16:30:28 +00:00
|
|
|
- name: Check IMSB
|
|
|
|
run: |-
|
|
|
|
./scripts/check_imsb.sh
|
|
|
|
- name: Generate todo.txt (again)
|
|
|
|
run: |-
|
|
|
|
comm -23 <(sort -u data/current.txt) <(awk -F= '{print $1}' data/identified.txt |sort -u) | sort -u > data/todo.txt
|
2022-08-26 15:58:22 +00:00
|
|
|
- name: Generate merged.txt
|
|
|
|
run: |-
|
2022-09-05 19:16:47 +00:00
|
|
|
npm run update-merged
|
2022-08-24 21:32:05 +00:00
|
|
|
- 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
|