mirror of
https://github.com/benbusby/farside.git
synced 2025-04-25 13:10:02 +00:00
Add auto update instances for libreddit (#80)
* Change libreddit's fallback URL to official instance's URL * Add auto update instances for libreddit
This commit is contained in:
parent
2a858b89d2
commit
f676d12988
3 changed files with 17 additions and 2 deletions
15
.github/workflows/update-instances.yml
vendored
15
.github/workflows/update-instances.yml
vendored
|
@ -189,6 +189,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
|
||||
# ==============================================================
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue