diff options
| author | Ben Busby <contact@benbusby.com> | 2021-12-23 17:33:44 -0700 |
|---|---|---|
| committer | Ben Busby <contact@benbusby.com> | 2021-12-23 17:33:44 -0700 |
| commit | 719beb90df7d573c95fea96f911f79d41c9f5fe5 (patch) | |
| tree | 1d7bb10deafefd71c614308278245133a87268b5 /.github | |
| parent | 6db5b4081159be694c4b5c8a55984434ceea3f83 (diff) | |
| download | farside-719beb90df7d573c95fea96f911f79d41c9f5fe5.tar.gz | |
Auto update whoogle instances from CI
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/update-instances.yml | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/.github/workflows/update-instances.yml b/.github/workflows/update-instances.yml index aefba6f..293e393 100644 --- a/.github/workflows/update-instances.yml +++ b/.github/workflows/update-instances.yml @@ -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") ) @@ -75,6 +75,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 # ============================================================== |
