mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-08 10:34:06 +00:00
Build all contributed recipes automatically (#1973)
* Build all contributed recipes automatically * Add missing file * Add checkout repo * Fix matrix * Remove unused var * Add typing
This commit is contained in:
29
.github/workflows/contributed-recipes.yml
vendored
29
.github/workflows/contributed-recipes.yml
vendored
@@ -20,8 +20,21 @@ on:
|
|||||||
workflow_call:
|
workflow_call:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
generate-matrix:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout Repo ⚡️
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Calculate recipes matrix 🛠
|
||||||
|
id: set-matrix
|
||||||
|
run: docs/using/recipe_code/generate_matrix.py >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
test-recipes:
|
test-recipes:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
needs: generate-matrix
|
||||||
if: github.repository == 'jupyter/docker-stacks'
|
if: github.repository == 'jupyter/docker-stacks'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@@ -38,18 +51,4 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix: ${{fromJson(needs.generate-matrix.outputs.matrix)}}
|
||||||
dockerfile:
|
|
||||||
[
|
|
||||||
custom_environment.dockerfile,
|
|
||||||
dask_jupyterlab.dockerfile,
|
|
||||||
jupyterhub_version.dockerfile,
|
|
||||||
mamba_install.dockerfile,
|
|
||||||
manpage_install.dockerfile,
|
|
||||||
microsoft_odbc.dockerfile,
|
|
||||||
oracledb.dockerfile,
|
|
||||||
pip_install.dockerfile,
|
|
||||||
rise_jupyterlab.dockerfile,
|
|
||||||
spellcheck_notebookv6.dockerfile,
|
|
||||||
xgboost.dockerfile,
|
|
||||||
]
|
|
||||||
|
@@ -6,7 +6,7 @@ Follow the process below to add a new recipe:
|
|||||||
1. Open the `docs/using/recipes.md` source file.
|
1. Open the `docs/using/recipes.md` source file.
|
||||||
2. Add a second-level Markdown heading naming your recipe at the bottom of the file (e.g., `## Slideshows with JupyterLab and RISE`)
|
2. Add a second-level Markdown heading naming your recipe at the bottom of the file (e.g., `## Slideshows with JupyterLab and RISE`)
|
||||||
3. Write the body of your recipe under the heading, including whatever command line, links, etc. you need.
|
3. Write the body of your recipe under the heading, including whatever command line, links, etc. you need.
|
||||||
4. If you have a Dockerfile, please put it in a `recipe_code` subdirectory
|
4. If you have a Dockerfile, please put it in a `recipe_code` subdirectory.
|
||||||
and update [contributed-recipes workflow](https://github.com/jupyter/docker-stacks/blob/main/.github/workflows/contributed-recipes.yml) to include your file.
|
This file will be built automatically by [contributed-recipes workflow](https://github.com/jupyter/docker-stacks/blob/main/.github/workflows/contributed-recipes.yml).
|
||||||
5. [Submit a pull request](https://github.com/PointCloudLibrary/pcl/wiki/A-step-by-step-guide-on-preparing-and-submitting-a-pull-request) (PR) with your changes.
|
5. [Submit a pull request](https://github.com/PointCloudLibrary/pcl/wiki/A-step-by-step-guide-on-preparing-and-submitting-a-pull-request) (PR) with your changes.
|
||||||
Maintainers will respond and work with you to address any formatting or content issues.
|
Maintainers will respond and work with you to address any formatting or content issues.
|
||||||
|
17
docs/using/recipe_code/generate_matrix.py
Executable file
17
docs/using/recipe_code/generate_matrix.py
Executable file
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# Copyright (c) Jupyter Development Team.
|
||||||
|
# Distributed under the terms of the Modified BSD License.
|
||||||
|
import json
|
||||||
|
from pathlib import Path
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
THIS_DIR = Path(__file__).parent.resolve()
|
||||||
|
|
||||||
|
|
||||||
|
def generate_matrix() -> dict[str, Any]:
|
||||||
|
dockerfiles = sorted(file.name for file in THIS_DIR.glob("*.dockerfile"))
|
||||||
|
return {"dockerfile": dockerfiles}
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
print("matrix=" + json.dumps(generate_matrix()))
|
Reference in New Issue
Block a user