summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorAustin Huang <im@austinhuang.me>2022-02-03 17:10:48 -0500
committerGitHub <noreply@github.com>2022-02-03 15:10:48 -0700
commit2cd82adeb9a095180c8ee708ae0d011f29bdde02 (patch)
tree4d6324e2e5f17b486e2f60f76975f628f89bc3a7 /.github
parent87b1e15c77db1df8b3450e2c3f17bc612ee2b05c (diff)
downloadfarside-2cd82adeb9a095180c8ee708ae0d011f29bdde02.tar.gz
Auto update teddit and Scribe instances (#15)
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/update-instances.yml28
1 files changed, 26 insertions, 2 deletions
diff --git a/.github/workflows/update-instances.yml b/.github/workflows/update-instances.yml
index 0db5be3..8f8a0ce 100644
--- a/.github/workflows/update-instances.yml
+++ b/.github/workflows/update-instances.yml
@@ -38,7 +38,6 @@ jobs:
# ==============================================================
# Searx update
# ==============================================================
- echo "Fetching searx instances..."
curl -s https://searx.space/data/instances.json | \
jq '[
.instances |
@@ -63,7 +62,7 @@ jobs:
apply_update
# ==============================================================
- # Simply Translate update
+ # SimplyTranslate update
# ==============================================================
curl -s https://simple-web.org/instances/simplytranslate > st-out
sed -i -e 's/^/https:\/\//' st-out
@@ -103,6 +102,31 @@ jobs:
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
# ==============================================================