diff --git a/.github/workflows/store-tagLoc.yml b/.github/workflows/store-tagLoc.yml new file mode 100644 index 0000000000..2c6367deb4 --- /dev/null +++ b/.github/workflows/store-tagLoc.yml @@ -0,0 +1,29 @@ +name: Tag Locations Data + +on: + schedule: + - cron: "*/60 * * * *" + + workflow_dispatch: + +jobs: + store: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Fetch data from API endpoint + run: curl "https://publiclab.org/api/srch/taglocations?nwlat=52&selat=-52&nwlng=-150&selng=150&limit=1000" > static/tagLocStore.json + + - name: Check if changes exist + run: | + git status + git diff + + - name: Commit and push + run: | + git config --global user.email "github-actions[bot]@users.noreply.github.com" + git config --global user.name "github-actions[bot]" + git add . + git commit -m "updated tagLocations data" + git push https://${{ secrets.GITHUB_TOKEN }}@github.com/daemon1024/plots2 diff --git a/static/tagLocStore.json b/static/tagLocStore.json new file mode 100644 index 0000000000..e69de29bb2