mirror of
https://github.com/benbusby/farside.git
synced 2025-04-20 10:58:42 +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
|
#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
|
# TODO: Update instances for other services
|
||||||
# ==============================================================
|
# ==============================================================
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
"type": "libreddit",
|
"type": "libreddit",
|
||||||
"test_url": "/r/popular",
|
"test_url": "/r/popular",
|
||||||
"fallback": "https://libredd.it",
|
"fallback": "https://libreddit.spike.codes",
|
||||||
"instances": [
|
"instances": [
|
||||||
"https://libreddit.albony.xyz",
|
"https://libreddit.albony.xyz",
|
||||||
"https://libredd.it",
|
"https://libredd.it",
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
"type": "libreddit",
|
"type": "libreddit",
|
||||||
"test_url": "/r/popular",
|
"test_url": "/r/popular",
|
||||||
"fallback": "https://libredd.it",
|
"fallback": "https://libreddit.spike.codes",
|
||||||
"instances": [
|
"instances": [
|
||||||
"https://libredd.it",
|
"https://libredd.it",
|
||||||
"https://libreddit.spike.codes",
|
"https://libreddit.spike.codes",
|
||||||
|
|
Loading…
Add table
Reference in a new issue