2023-05-18 11:25:12 +00:00
|
|
|
name: Sync lnproxy relays
|
2023-05-18 11:14:11 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Fetch and process JSON
|
|
|
|
run: |
|
2023-05-18 11:25:12 +00:00
|
|
|
curl https://raw.githubusercontent.com/shyfire131/lnproxy-webui2/17d6131a72a92978e5c0dc57ab2b2fbe467c7722/assets/relays.json -o lnproxy_tmplist.json
|
2023-05-18 11:14:11 +00:00
|
|
|
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
|
2023-05-18 11:25:12 +00:00
|
|
|
git diff --quiet && git diff --staged --quiet || git commit -m "Update LNProxy relay list"
|
2023-05-18 11:14:11 +00:00
|
|
|
git push
|
|
|
|
|
|
|
|
- name: Remove tmp lnproxy json file
|
|
|
|
run: rm lnproxy_tmplist.json
|