Skip to content

Update data from InReach #18

Update data from InReach

Update data from InReach #18

Workflow file for this run

name: Update data from InReach
on:
schedule:
- cron: "0 */6 * * *"
jobs:
fetch:
name: Fetch InReach data
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm install node-fetch where xml2js
- run: node .github/fetchinreach.mjs
env:
INREACH_URL: ${{secrets.INREACH_URL}}
- name: Commit files
run: |
if [ -z "$(git status --porcelain)" ]; then exit 0;fi
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add _data/inreach.json
git commit -m "Updated InReach data"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main