robosats/.github/workflows/lnproxy-sync.yml
+shyfire131 5d2339bfcf
Additional updates to LnProxy support (#609)
* Fetch relay list from official lnproxy repo

My changes have been merged on the lnproxy.org repo, so RoboSats must not fetch from my fork of lnproxy anymore.

* Grant workflow job write perms

By default, the GITHUB_TOKEN only has read permissions. Write is required in order to update the list of relays.

* Update to latest version of checkout action

---------

Co-authored-by: +shyfire131 <shyfire131@shyfire131.net>
2023-05-22 09:41:40 +00:00

34 lines
984 B
YAML

name: Sync lnproxy relays
on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: "0 12 * * 0" # Run every Sunday at noon
jobs:
sync:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Fetch and process JSON
run: |
curl https://raw.githubusercontent.com/lnproxy/lnproxy-webui2/main/assets/relays.json -o lnproxy_tmplist.json
node .github/workflows/scripts/lnproxy-sync.js
- name: Commit and push if it's not up to date
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add ./frontend/static/lnproxies.json
git diff --quiet && git diff --staged --quiet || git commit -m "Update LNProxy relay list"
git push
- name: Remove tmp lnproxy json file
run: rm lnproxy_tmplist.json