-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (43 loc) · 1.49 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
43
44
45
46
47
48
49
50
51
52
53
54
55
name: update-data
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
#schedule:
# - cron: "0 0 1 * *" # Runs at 00:00 UTC on the first of every month
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout repo content
uses: actions/checkout@v3
- name: setup python
uses: actions/setup-python@v3
with:
python-version: 3.9
- name: install pipenv
run: |
pip install --user pipenv
USER_BASE=`python -m site --user-base`
export PATH=$USER_BASE/bin:$PATH
- name: install Python dependencies
run: pipenv install
- name: clone roll-wrangler repo
run: |
git clone https://github.com/pianoroll/roll-wrangler.git
- name: move roll-wrangler files to expected locations
run: |
mv ./roll-wrangler/midi/note/*.mid midi/note/.
mv ./roll-wrangler/midi/exp/*.mid midi/exp/.
mv ./roll-wrangler/txt/*.txt input/txt/.
- name: run the data generation script
run: pipenv run python build-pianolatron-files.py
- name: commit the new/updated output files to the repo
uses: EndBug/[email protected]
with:
add: '["output/json/*.json","output/midi/exp/*.mod","output/midi/note/*.mid","midi/exp/*.mid","midi/note/*.mid","output/catalog.json"]'
message: "Automatic update"
author_name: GitHub Actions
author_email: [email protected]