From 6e1fb15edf87a1f0ffe6e443f3ba734ae1764881 Mon Sep 17 00:00:00 2001 From: lollerfirst <43107113+lollerfirst@users.noreply.github.com> Date: Thu, 11 Sep 2025 13:30:33 +0200 Subject: [PATCH] feat: weekly update bundled georelays (#524) * update bundled georelays * fix typo --- .github/workflows/fetch_georelays.yml | 40 +++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/fetch_georelays.yml diff --git a/.github/workflows/fetch_georelays.yml b/.github/workflows/fetch_georelays.yml new file mode 100644 index 00000000..bd629e01 --- /dev/null +++ b/.github/workflows/fetch_georelays.yml @@ -0,0 +1,40 @@ +name: Fetch GeoRelays Data + +on: + schedule: + - cron: '0 6 * * 0' + workflow_dispatch: + +permissions: + contents: write + +jobs: + update-relay-data: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Fetch GeoRelays + run: | + wget https://raw.githubusercontent.com/permissionlesstech/georelays/refs/heads/main/nostr_relays.csv + mv nostr_relays.csv ./relays/online_relays_gps.csv + + - name: Check for changes + id: git-check + run: | + git diff --exit-code || echo "changes=true" >> $GITHUB_OUTPUT + + - name: Commit and push changes + if: steps.git-check.outputs.changes == 'true' + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git add relays/online_relays_gps.csv + git commit -m "Automated update of relay data - $(date -u)" + git push + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file