Skip to content

Fetch weekly UK small boat data #129

Fetch weekly UK small boat data

Fetch weekly UK small boat data #129

name: Fetch weekly UK small boat data
on:
repository_dispatch:
schedule:
- cron: '10 12 * * 2'
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/weekly_small_boats/${{ steps.date.outputs.date }}.html "https://www.gov.uk/government/statistics/migrants-detected-crossing-the-english-channel-in-small-boats-weekly-data"
- 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 weekly UK small boat data: ${timestamp}" || exit 0
git push