-
Notifications
You must be signed in to change notification settings - Fork 3
53 lines (44 loc) · 1.35 KB
/
build.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
# MIT licensed
name: openMINDS_MATLAB-schema_build_pipeline
on:
push:
branches:
- pipeline
workflow_dispatch: # This triggers the workflow when a webhook is received
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v2
with:
python-version: 3.11
- name: Run build
run: |
pip install -r requirements.txt
python build.py
- name: Checkout main branch
uses: actions/checkout@v3
with:
ref: main
path: main
token: ${{ secrets.GITHUB_TOKEN }}
- name: Push to main
run: |
rm -rf main/code/schemas/*
rm -rf main/code/mixedtypes/*
cp -R target/* main/code
cp -R main/code/internal/resources/content_files/* main/code/
cp -R main/code/internal/resources/readme_files/* main/code/
cd main
git config --global user.email "[email protected]"
git config --global user.name "openMINDS pipeline"
if [[ $(git add . --dry-run | wc -l) -gt 0 ]]; then
git add .
git commit -m "build triggered by submodule ${{ inputs.repository }} version ${{ inputs.branch }}"
git push -f
else
echo "Nothing to commit"
fi