diff options
| author | Ben Busby <contact@benbusby.com> | 2023-08-23 13:46:51 -0600 |
|---|---|---|
| committer | Ben Busby <contact@benbusby.com> | 2023-08-23 13:46:51 -0600 |
| commit | 7e47e9536aa347d8a0ea24dfef3c034ad50d9a76 (patch) | |
| tree | 39144a2cce1df66499d160a22541a24ce60e0381 /.github | |
| parent | cc1a04099122cee88ffaf9eb1bde14ad826f686c (diff) | |
| download | farside-7e47e9536aa347d8a0ea24dfef3c034ad50d9a76.tar.gz | |
Poll nitter instances only in nightly build
From the recent changes to twitter/X, it sounds like guest accounts are
now required for nitter, which are more easily rate limited. To avoid
any impact from Farside, the instances are now health checked in the
nightly build using https://status.d420.de (this doesn't seem to be
directly associated with the nitter maintainers, so might not be
entirely future-proof).
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/update-instances.yml | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/.github/workflows/update-instances.yml b/.github/workflows/update-instances.yml index 5cda693..ed1df77 100644 --- a/.github/workflows/update-instances.yml +++ b/.github/workflows/update-instances.yml @@ -110,6 +110,23 @@ 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://codeberg.org/SimpleWeb/Website/raw/branch/master/config.json | jq -r '.projects | map(select(.id == "simplytranslate"))[0].instances | .[]' > st-out |
