mirror of
https://github.com/benbusby/farside.git
synced 2025-03-14 19:26:30 -04:00
Auto update whoogle instances from CI
This commit is contained in:
parent
6db5b40811
commit
719beb90df
16
.github/workflows/update-instances.yml
vendored
16
.github/workflows/update-instances.yml
vendored
@ -64,9 +64,9 @@ jobs:
|
||||
# ==============================================================
|
||||
# Simply Translate update
|
||||
# ==============================================================
|
||||
curl -s https://simple-web.org/instances/simplytranslate | sort > st-out
|
||||
curl -s https://simple-web.org/instances/simplytranslate > st-out
|
||||
sed -i -e 's/^/https:\/\//' st-out
|
||||
jq -ncR '[inputs]' <<< "$(cat st-out)" > st-tmp.json
|
||||
jq -ncR '[inputs]' <<< "$(cat st-out | sort)" > st-tmp.json
|
||||
|
||||
jq --slurpfile simplytranslate st-tmp.json \
|
||||
'( .[] | select(.type == "simplytranslate") )
|
||||
@ -74,6 +74,18 @@ jobs:
|
||||
|
||||
apply_update
|
||||
|
||||
# ==============================================================
|
||||
# Whoogle update
|
||||
# ==============================================================
|
||||
curl -s https://raw.githubusercontent.com/benbusby/whoogle-search/main/misc/instances.txt > whoogle-out
|
||||
jq -ncR '[inputs]' <<< "$(cat whoogle-out | sort)" > whoogle-tmp.json
|
||||
|
||||
jq --slurpfile whoogle whoogle-tmp.json \
|
||||
'( .[] | select(.type == "whoogle") )
|
||||
.instances |= $whoogle[0]' services.json > services-tmp.json
|
||||
|
||||
apply_update
|
||||
|
||||
# ==============================================================
|
||||
# TODO: Update instances for other services
|
||||
# ==============================================================
|
||||
|
Loading…
x
Reference in New Issue
Block a user