Skip to content

Export the notebook on ZIP file for BioImage.IO. #9

Export the notebook on ZIP file for BioImage.IO.

Export the notebook on ZIP file for BioImage.IO. #9

name: Export the notebook on ZIP file for BioImage.IO.
on:
workflow_dispatch:
inputs:
notebook_name: # the variable you can use in place of a matrix
description: 'Name of the notebook you want to export. You need to provide the "id" from manifest.bioimage.io.yaml.'
type: string
jobs:
export-notebook:
runs-on: ubuntu-latest
steps:
- name: Clone ZeroCostDL4Mic repository
uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: "3.9"
- name: Install requirements
run: pip install -r Tools/CI_requirements.txt
- name: Export the notebook and create a ZIP file with it
run: python3 Tools/export_bmz_notebook.py --name "${{ inputs.notebook_name }}" --output "./tmp"
- name: Upload exported ZIP file
uses: actions/upload-artifact@v4
id: artifact-upload-step
with:
name: "${{ inputs.notebook_name }}.zip"
path: "./tmp/${{ inputs.notebook_name }}.zip"
- name: Output artifact URL
run: echo "Artifact URL is ${{ steps.artifact-upload-step.outputs.artifact-url }}"
- name: Stage the ZIP file into BioImage.IO
run: python3 Tools/stage_bmz_notebook.py --id "${{ inputs.notebook_name }}" --url "${{ steps.artifact-upload-step.outputs.artifact-url }}"