Skip to content

Download and commit considerations CSV #230

Download and commit considerations CSV

Download and commit considerations CSV #230

name: Download and commit considerations CSV
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
download_and_commit:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Download file
run: |
curl -o data/planning-considerations.csv https://design.planning.data.gov.uk/planning-consideration/planning-considerations.csv
- name: Set up git
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
- name: Commit and push changes
run: |
git add data/planning-considerations.csv
if ! git diff-index --quiet HEAD --; then
git commit -m "Add downloaded planning-considerations.csv file"
git push
else
echo "No changes to commit"
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}