-
Notifications
You must be signed in to change notification settings - Fork 5
64 lines (57 loc) · 1.97 KB
/
import_data.yaml
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Import Dataset
on: ["push", "pull_request"]
jobs:
stable:
runs-on: ubuntu-latest
env:
INVENTREE_DB_ENGINE: sqlite3
INVENTREE_DB_NAME: inventree_db_stable.sqlite3
INVENTREE_BACKUP_DIR: $GITHUB_WORKSPACE/path/to/backup
INVENTREE_MEDIA_ROOT: $GITHUB_WORKSPACE/path/to/media
INVENTREE_STATIC_ROOT: $GITHUB_WORKSPACE/path/to/static
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install InvenTree
run: |
sudo apt-get install python3-dev python3-pip python3-venv python3-wheel g++
pip3 install invoke
git clone --depth 1 https://github.com/inventree/inventree inventree -b stable
cd inventree
invoke install
- name: Import Database Records
run: |
cd inventree
invoke migrate
invoke import-records -c -f $GITHUB_WORKSPACE/inventree_data.json
latest:
runs-on: ubuntu-latest
env:
INVENTREE_DB_ENGINE: sqlite3
INVENTREE_DB_NAME: inventree_db_latest.sqlite3
INVENTREE_BACKUP_DIR: $GITHUB_WORKSPACE/path/to/backup
INVENTREE_MEDIA_ROOT: $GITHUB_WORKSPACE/path/to/media
INVENTREE_STATIC_ROOT: $GITHUB_WORKSPACE/path/to/static
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install InvenTree
run: |
sudo apt-get install python3-dev python3-pip python3-venv python3-wheel g++
pip3 install invoke
git clone --depth 1 https://github.com/inventree/inventree inventree
cd inventree
invoke install
- name: Import Database Records
run: |
cd inventree
invoke migrate
invoke import-records -c -f $GITHUB_WORKSPACE/inventree_data.json