summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/update-instances.yml98
1 files changed, 79 insertions, 19 deletions
diff --git a/.github/workflows/update-instances.yml b/.github/workflows/update-instances.yml
index f8e6080..0ee818c 100644
--- a/.github/workflows/update-instances.yml
+++ b/.github/workflows/update-instances.yml
@@ -10,7 +10,10 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Install dependencies
- run: sudo apt-get install -y jq dnsutils
+ run: |
+ sudo apt-get install -y jq dnsutils
+ sudo curl -L https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -o /usr/local/bin/yq
+ sudo chmod a+rx /usr/local/bin/yq
- uses: webfactory/ssh-agent@v0.5.3
with:
@@ -57,23 +60,8 @@ jobs:
# ==============================================================
# searx update
# ==============================================================
- curl -s https://searx.space/data/instances.json | \
- jq '[
- .instances |
- to_entries[] |
- select(.value.network_type == "normal") |
- select(.value.version | . != null) |
- select(.value.network.asn_privacy == 0) |
- select(.value.http.error == null) |
- select(.value.tls.grade == "A+" or .value.tls.grade == "A") |
- select(.value.http.grade == "A+" or .value.http.grade == "A") |
- select(.value.html.grade == "V" or .value.html.grade == "F") |
- select(.key | contains(".i2p") | not) |
- .key
- ] | sort' > searx-tmp.json
-
- cat searx-tmp.json | jq .
-
+ curl -s https://raw.githubusercontent.com/searx/searx-instances/master/searxinstances/instances.yml | \
+ yq -o=json 'keys | sort' > searx-tmp.json
jq --slurpfile searx searx-tmp.json \
'( .[] | select(.type == "searx") )
.instances |= $searx[0]' services-full.json > services-tmp.json
@@ -110,9 +98,26 @@ jobs:
apply_update
# ==============================================================
+ # Nitter update
+ # ==============================================================
+ curl -s https://status.d420.de/api/v1/instances | \
+ jq '[
+ .hosts |
+ to_entries[] |
+ select(.value.healthy == true) |
+ .value.url ] |
+ sort' > nitter-tmp.json
+
+ jq --slurpfile nitter nitter-tmp.json \
+ '( .[] | select(.type == "nitter") )
+ .instances |= $nitter[0]' services-full.json > services-tmp.json
+
+ apply_update
+
+ # ==============================================================
# SimplyTranslate update
# ==============================================================
- curl -s https://simple-web.org/instances/simplytranslate > st-out
+ curl -s https://codeberg.org/SimpleWeb/Website/raw/branch/master/config.json | jq -r '.projects | map(select(.id == "simplytranslate"))[0].instances | .[]' > st-out
sed -i -e 's/^/https:\/\//' st-out
jq -ncR '[inputs]' <<< "$(cat st-out | sort)" > st-tmp.json
@@ -214,6 +219,61 @@ jobs:
apply_update
# ==============================================================
+ # BreezeWiki update
+ # ==============================================================
+ curl -s https://docs.breezewiki.com/files/instances.json | \
+ jq '[.[] | .instance]' > breezewiki-tmp.json
+ jq --slurpfile breezewiki breezewiki-tmp.json \
+ '(.[] | select(.type == "breezewiki") )
+ .instances |= $breezewiki[0]' services-full.json > services-tmp.json
+
+ apply_update
+
+ # ==============================================================
+ # GotHub update
+ # ==============================================================
+
+ curl -s https://codeberg.org/gothub/gothub-instances/raw/branch/master/instances.json | \
+ jq '[.[] | .link]' > gothub-tmp.json
+ jq --slurpfile gothub gothub-tmp.json \
+ '(.[] | select(.type == "gothub") )
+ .instances |= $gothub[0]' services-full.json > services-tmp.json
+
+ apply_update
+
+ # ==============================================================
+ # librex update
+ # ==============================================================
+ curl -s https://raw.githubusercontent.com/Ahwxorg/LibreY/main/instances.json | \
+ jq '[
+ .instances |
+ .[] |
+ select(.librey|not) |
+ .clearnet] |
+ sort' > librex-tmp.json
+ jq --slurpfile librex librex-tmp.json \
+ '( .[] | select(.type == "librex") )
+ .instances |= $librex[0]' services-full.json > services-tmp.json
+
+ apply_update
+
+ # ==============================================================
+ # librey update
+ # ==============================================================
+ curl -s https://raw.githubusercontent.com/Ahwxorg/LibreY/main/instances.json | \
+ jq '[
+ .instances |
+ .[] |
+ select(.librey == true) |
+ .clearnet] |
+ sort' > librey-tmp.json
+ jq --slurpfile librey librey-tmp.json \
+ '( .[] | select(.type == "librey") )
+ .instances |= $librey[0]' services-full.json > services-tmp.json
+
+ apply_update
+
+ # ==============================================================
# TODO: Update instances for other services
# ==============================================================