-
Notifications
You must be signed in to change notification settings - Fork 134
33 lines (31 loc) · 1.35 KB
/
export_notebook.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
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 }}"