Skip to content

Scrape latest data #132038

Scrape latest data

Scrape latest data #132038

Workflow file for this run

name: Scrape latest data
on:
push:
workflow_dispatch:
schedule:
- cron: '*/5 * * * *' # If you enter a time here, note that it will be in UTC
jobs:
scrape:
runs-on: ubuntu-latest
steps:
# Step 1: Prepare the environment
- name: Check out this repo
uses: actions/checkout@v2
with:
fetch-depth: 0
# Step 2: Get the latest data and store it as a CSV
- name: Fetch latest data
run: |-
curl "https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_day.csv" -o usgs_current.csv
# Step 3: Commit and push
- name: Commit and push
run: |-
git config user.name "Automated"
git config user.email "actions@users.noreply.github.com"
git add -A
timestamp=$(date -u)
git commit -m "Latest data: ${timestamp}" || exit 0
git push