Skip to content

openMINDS_dev_build_pipeline #37

openMINDS_dev_build_pipeline

openMINDS_dev_build_pipeline #37

Workflow file for this run

# MIT licensed
name: openMINDS_dev_build_pipeline
on:
push:
branches:
- pipeline
workflow_dispatch: # This triggers the workflow when a webhook is received
inputs:
branch:
description: 'The branch of the submodule the workflow was triggered for'
required: true
type: string
repository:
description: 'The repository of the submodule the workflow was triggered for'
required: true
type: string
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 --repository "${{ inputs.repository }}" --branch "${{ inputs.branch }}" --config versions-dev.json
- name: Checkout development branch
uses: actions/checkout@v3
with:
ref: development
path: development
token: ${{ secrets.GITHUB_TOKEN }}
- name: Push to development
run: |
cp -R target/* development
cd development
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