-
-
Notifications
You must be signed in to change notification settings - Fork 26
49 lines (41 loc) · 1.45 KB
/
update-data.yml
File metadata and controls
49 lines (41 loc) · 1.45 KB
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
43
44
45
46
47
48
49
name: Update data
permissions: {}
on:
workflow_dispatch:
schedule:
- cron: "0 0 1 * *" # run once a month
jobs:
resources:
name: Update resources
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
pip install -r requirements-data.txt
pip install -r requirements-test.txt
- name: Update data
run: |
python scripts/updatedata.py
- name: Run pre-commit
continue-on-error: true
run: |
pre-commit run --files src/codicefiscale/data/countries.json src/codicefiscale/data/municipalities.json
- name: Commit data
uses: test-room-7/action-update-file@be6fb6d9c59d5ec4b56542f2e8ad2516a99e3402 # v2.0.0
with:
file-path: |
src/codicefiscale/data/countries.json
src/codicefiscale/data/municipalities.json
commit-msg: "Updated `countries.json` and/or `municipalities.json` data."
committer-name: "Fabio Caccamo [bot]"
committer-email: "fabio.caccamo@gmail.com"
github-token: ${{ secrets.WORKFLOWS_UPDATE_DATA_TOKEN }}