diff options
| author | sian1468 <58017832+sian1468@users.noreply.github.com> | 2022-12-12 03:45:13 +0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-11 13:45:13 -0700 |
| commit | f676d12988cb5dcb70beab908bedf2cc84cead2f (patch) | |
| tree | 6bef14abf4cced8030fe3771762cd6f8fb19d49f /.github | |
| parent | 2a858b89d26ea03c3bbd6646ae65cf2ac70fd98e (diff) | |
| download | farside-f676d12988cb5dcb70beab908bedf2cc84cead2f.tar.gz | |
Add auto update instances for libreddit (#80)
* Change libreddit's fallback URL to official instance's URL
* Add auto update instances for libreddit
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/update-instances.yml | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/.github/workflows/update-instances.yml b/.github/workflows/update-instances.yml index e8fc9c7..59341e1 100644 --- a/.github/workflows/update-instances.yml +++ b/.github/workflows/update-instances.yml @@ -190,6 +190,21 @@ jobs: #apply_update # ============================================================== + # libreddit update + # ============================================================== + curl -s https://raw.githubusercontent.com/libreddit/libreddit-instances/master/instances.json | \ + jq '[ + .instances[] | + select(.url) | + .url ] | + sort' > libreddit-tmp.json + jq --slurpfile libreddit libreddit-tmp.json \ + '( .[] | select(.type == "libreddit") ) + .instances |= $libreddit[0]' services-full.json > services-tmp.json + + apply_update + + # ============================================================== # TODO: Update instances for other services # ============================================================== |
