-
Notifications
You must be signed in to change notification settings - Fork 28
42 lines (38 loc) · 1.25 KB
/
update_data.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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