Skip to content

Update data sources #140

Update data sources

Update data sources #140

Workflow file for this run

name: Update data sources
on:
schedule:
- cron: 45 3 * * 0
jobs:
update-data:
if: github.repository == 'okfn/publicbodies'
name: Update data from sources
runs-on: ubuntu-latest
strategy:
matrix:
source: [br, it]
steps:
- name: Check out repository
uses: actions/checkout@v3
with:
ref: main # branch
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: 3.8
architecture: x64
- name: Install Python dependencies
uses: py-actions/py-dependency-install@v4
with:
path: "scripts/requirements.txt"
- name: Update ${{ matrix.source }}.csv file
run: "python3 scripts/import/${{ matrix.source }}/import_${{ matrix.source }}.py --output data/${{ matrix.source }}.csv"
- name: re-sync with git repo
run: git pull
- name: commit & push with rebase
uses: benkaiser/[email protected]
with:
branch: main
author_email: 41898282+github-actions[bot]@users.noreply.github.com
author_name: GitHub Actions Update Bot
message: "Update ${{ matrix.source }} data source automatically scheduled with Github actions"
rebase: true