Skip to content

Commit

Permalink
add option to not build naavre-jupyter for given flavors
Browse files Browse the repository at this point in the history
  • Loading branch information
gpelouze committed Feb 16, 2024
1 parent d2beb84 commit 4a6ed8b
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 6 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/make-flavor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ on:
description: 'NaaVRE base image version'
type: string
required: true
build_jupyter:
description: 'Whether to build the NaaVRE Jupyter images'
type: boolean
required: true

jobs:
build-naavre-cell-build:
Expand Down Expand Up @@ -48,6 +52,7 @@ jobs:
image_repo: ${{ inputs.image_repo }}
image_version: ${{ inputs.naavre_version }}-${{ inputs.image_version }}
naavre_version: ${{ inputs.naavre_version }}
if: ${{ inputs.build_jupyter }}

test:
uses: ./.github/workflows/test-naavre-cell.yaml
Expand Down Expand Up @@ -80,4 +85,4 @@ jobs:
with:
image_name: naavre-jupyter-${{ inputs.flavor_name }}
image_repo: ${{ inputs.image_repo }}
if: ${{ github.event_name == 'release' }}
if: ${{ github.event_name == 'release' && inputs.build_jupyter }}
10 changes: 5 additions & 5 deletions .github/workflows/make.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ jobs:
name: List flavors
runs-on: ubuntu-latest
outputs:
flavors: ${{ steps.list-flavors.outputs.flavors }}
matrix: ${{ steps.list-flavors.outputs.matrix }}
steps:
- uses: actions/checkout@v4
- id: list-flavors
name: List flavors
run: |
flavors=$(find ./flavors -mindepth 1 -maxdepth 1 -type d | jq -Rsc 'split("\n")[:-1] | map(split("/")[-1])')
echo "flavors=$flavors" | tee -a $GITHUB_OUTPUT
matrix=$(find ./flavors -mindepth 2 -maxdepth 2 -name 'flavor_config.yaml' | xargs yq ea -o=j -I=0 '[.]')
echo "matrix={\"include\":$(echo $matrix)}" >> $GITHUB_OUTPUT
flavors:
name: Flavor ${{ matrix.flavor_name }}
Expand All @@ -34,6 +34,6 @@ jobs:
image_repo: 'ghcr.io/qcdis/naavre'
image_version: ${{ github.ref_type == 'tag' && github.ref_name || github.sha }}
naavre_version: 'v2.3.3-beta'
build_jupyter: ${{ matrix.build_jupyter }}
strategy:
matrix:
flavor_name: ${{ fromJson(needs.list-flavors.outputs.flavors) }}
matrix: ${{ fromJson(needs.list-flavors.outputs.matrix) }}
2 changes: 2 additions & 0 deletions flavors/laserfarm/flavor_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
flavor_name: laserfarm
build_jupyter: True
2 changes: 2 additions & 0 deletions flavors/lter-life-veluwe/flavor_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
flavor_name: lter-life-veluwe
build_jupyter: True
2 changes: 2 additions & 0 deletions flavors/python/flavor_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
flavor_name: python
build_jupyter: False
2 changes: 2 additions & 0 deletions flavors/r/flavor_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
flavor_name: r
build_jupyter: False

0 comments on commit 4a6ed8b

Please sign in to comment.