mirror of
https://github.com/benbusby/farside.git
synced 2025-04-20 10:58:42 +00:00
Change auto-update procedure for SearX instances (#134)
This commit is contained in:
parent
4a655c7580
commit
21c15528a5
1 changed files with 6 additions and 18 deletions
24
.github/workflows/update-instances.yml
vendored
24
.github/workflows/update-instances.yml
vendored
|
@ -10,7 +10,10 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Install dependencies
|
- 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
|
- uses: webfactory/ssh-agent@v0.5.3
|
||||||
with:
|
with:
|
||||||
|
@ -57,23 +60,8 @@ jobs:
|
||||||
# ==============================================================
|
# ==============================================================
|
||||||
# searx update
|
# searx update
|
||||||
# ==============================================================
|
# ==============================================================
|
||||||
curl -s https://searx.space/data/instances.json | \
|
curl -s https://raw.githubusercontent.com/searx/searx-instances/master/searxinstances/instances.yml | \
|
||||||
jq '[
|
yq -o=json 'keys | sort' > searx-tmp.json
|
||||||
.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 .
|
|
||||||
|
|
||||||
jq --slurpfile searx searx-tmp.json \
|
jq --slurpfile searx searx-tmp.json \
|
||||||
'( .[] | select(.type == "searx") )
|
'( .[] | select(.type == "searx") )
|
||||||
.instances |= $searx[0]' services-full.json > services-tmp.json
|
.instances |= $searx[0]' services-full.json > services-tmp.json
|
||||||
|
|
Loading…
Add table
Reference in a new issue