Skip to content

Dataset :: scrape latest data #6

Dataset :: scrape latest data

Dataset :: scrape latest data #6

name: Scrape latest data
on:
workflow_dispatch:
schedule:
- cron: '29 5,19 * * *'
jobs:
scrape:
runs-on: ubuntu-latest
steps:
- name: Check out this repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Fetch latest data
run: |-
curl -fsSL https://old.datahub.io/api/3/action/resource_search?query=format:api/sparql | jq > endpoints_scraped.json
- 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 data: ${timestamp}" || exit 0
git push