mirror of
https://github.com/benbusby/farside.git
synced 2025-04-20 10:58:42 +00:00
Auto update teddit and Scribe instances (#15)
This commit is contained in:
parent
87b1e15c77
commit
2cd82adeb9
1 changed files with 26 additions and 2 deletions
26
.github/workflows/update-instances.yml
vendored
26
.github/workflows/update-instances.yml
vendored
|
@ -38,7 +38,6 @@ jobs:
|
||||||
# ==============================================================
|
# ==============================================================
|
||||||
# Searx update
|
# Searx update
|
||||||
# ==============================================================
|
# ==============================================================
|
||||||
echo "Fetching searx instances..."
|
|
||||||
curl -s https://searx.space/data/instances.json | \
|
curl -s https://searx.space/data/instances.json | \
|
||||||
jq '[
|
jq '[
|
||||||
.instances |
|
.instances |
|
||||||
|
@ -102,6 +101,31 @@ jobs:
|
||||||
|
|
||||||
apply_update
|
apply_update
|
||||||
|
|
||||||
|
# ==============================================================
|
||||||
|
# Scribe update
|
||||||
|
# ==============================================================
|
||||||
|
curl -s https://git.sr.ht/~edwardloveall/scribe/blob/main/docs/instances.json > scribe-tmp.json
|
||||||
|
jq --slurpfile scribe scribe-tmp.json \
|
||||||
|
'( .[] | select(.type == "scribe") )
|
||||||
|
.instances |= $scribe[0]' services.json > services-tmp.json
|
||||||
|
|
||||||
|
apply_update
|
||||||
|
|
||||||
|
# ==============================================================
|
||||||
|
# teddit update
|
||||||
|
# ==============================================================
|
||||||
|
curl -s https://codeberg.org/teddit/teddit/raw/branch/main/instances.json | \
|
||||||
|
jq '[
|
||||||
|
.[] |
|
||||||
|
select(.url | contains("https")) |
|
||||||
|
.url ] |
|
||||||
|
sort' > teddit-tmp.json
|
||||||
|
jq --slurpfile teddit teddit-tmp.json \
|
||||||
|
'( .[] | select(.type == "teddit") )
|
||||||
|
.instances |= $teddit[0]' services.json > services-tmp.json
|
||||||
|
|
||||||
|
apply_update
|
||||||
|
|
||||||
# ==============================================================
|
# ==============================================================
|
||||||
# TODO: Update instances for other services
|
# TODO: Update instances for other services
|
||||||
# ==============================================================
|
# ==============================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue