Skip to content

Fetch daily UK small boat data #917

Fetch daily UK small boat data

Fetch daily UK small boat data #917

name: Fetch daily UK small boat data
on:
repository_dispatch:
schedule:
- cron: '0 12 * * *'
jobs:
scheduled:
runs-on: ubuntu-latest
steps:
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: Check out this repo
uses: actions/checkout@v4
- name: Fetch the data
run: |-
curl -s --compressed -o data/daily_small_boats/${{ steps.date.outputs.date }}.html "https://www.gov.uk/government/statistical-data-sets/migrants-detected-crossing-the-english-channel-in-small-boats"
- name: Commit and push data 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 daily UK small boat data: ${timestamp}" || exit 0
git push