add naavre-jupyter-vol2bird #18
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Make | |
on: | |
release: | |
types: [published] | |
push: | |
branches: | |
- '**' | |
tags-ignore: | |
- '**' | |
schedule: | |
- cron: '0 4 5,25 * *' | |
jobs: | |
list-flavors: | |
name: List flavors | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.list-flavors.outputs.matrix }} | |
steps: | |
- uses: actions/checkout@v4 | |
- id: list-flavors | |
name: List flavors | |
run: | | |
matrix=$(find ./flavors -mindepth 2 -maxdepth 2 -name 'flavor_config.yaml' | xargs yq ea -o=j -I=0 '[.]') | |
echo "matrix={\"include\":$(echo $matrix)}" | tee -a $GITHUB_OUTPUT | |
flavors: | |
name: Flavor ${{ matrix.flavor_name }} | |
uses: ./.github/workflows/make-flavor.yaml | |
needs: [list-flavors] | |
with: | |
flavor_name: ${{ matrix.flavor_name }} | |
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: ${{ fromJson(needs.list-flavors.outputs.matrix) }} | |
save-base-image-tags: | |
name: Save base image tags | |
runs-on: ubuntu-latest | |
needs: [flavors] | |
if: ${{ github.event_name == 'release' }} | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Generate base_image_tags.json | |
run: | | |
find ./flavors -mindepth 2 -maxdepth 2 -name 'flavor_config.yaml' | \ | |
xargs yq ea -o=j '[.] | map({"key": .flavor_name, "value": {"build": "ghcr.io/qcdis/naavre/naavre-cell-build-" + .flavor_name + ":${{ github.ref_name }}", "runtime": "ghcr.io/qcdis/naavre/naavre-cell-runtime-" + .flavor_name + ":${{ github.ref_name }}"}}) | from_entries' \ | |
| tee /tmp/base_image_tags.json | |
- name: Add base_image_tags.json to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: /tmp/base_image_tags.json | |
asset_name: base_image_tags.json | |
tag: ${{ github.ref }} |