Skip to content

Scrape latest location XML #54714

Scrape latest location XML

Scrape latest location XML #54714

name: Scrape latest location XML
on:
push:
workflow_dispatch:
schedule:
- cron: '27,57 * * * *'
jobs:
scheduled:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Check out this repo
uses: actions/checkout@v2
- name: Fetch latest data
run: |-
curl https://www.givefood.org.uk/api/2/locations/?format=xml > locations.xml
- name: Commit and push if it changed
run: |-
git config user.name "Automated"
git config user.email "[email protected]"
git add -A
timestamp=$(date -u)
git commit -m "Latest location XML data: ${timestamp}" || exit 0
git push