Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 15 additions & 50 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

jobs:
build:
timeout-minutes: 360
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -60,6 +61,13 @@ jobs:
tags: ghcr.io/${{ vars.ORG_REPO }}/${{ github.event.repository.name }}
outputs: type=image,push-by-digest=true,name-canonical=true,push=true

- name: Test notebooks
shell: bash
run: |
docker run -t ghcr.io/${{ vars.ORG_REPO }}/${{ github.event.repository.name }}@${{ steps.build.outputs.digest }} bash -c " \
pip install pytest nbmake; \
find . -name '*.ipynb' | pytest --nbmake --nbmake-timeout=3600;"

- name: Export digest
run: |
mkdir -p ${{ runner.temp }}/digests
Expand All @@ -74,9 +82,10 @@ jobs:
if-no-files-found: error
retention-days: 1

merge:
tags:
if: github.event_name != 'pull_request'
runs-on: ubuntu-24.04
name: merge into multiarch manifest
name: merge and tag
needs:
- build
steps:
Expand Down Expand Up @@ -104,7 +113,9 @@ jobs:
uses: docker/metadata-action@v5.8.0
with:
images: ghcr.io/${{ vars.ORG_REPO }}/${{ github.event.repository.name }}
tags: dev
tags: |
latest
${{ needs.build.outputs.tag }}

- name: Create manifest list and push
id: annotate
Expand All @@ -128,53 +139,7 @@ jobs:

- name: Inspect image
run: |
docker buildx imagetools inspect ghcr.io/${{ vars.ORG_REPO }}/${{ github.event.repository.name }}:dev

tests:
strategy:
fail-fast: false
matrix:
platform:
- linux/amd64
- linux/arm64
runs-on: ${{ matrix.platform == 'linux/amd64' && 'ubuntu-latest' || matrix.platform == 'linux/arm64' && 'ubuntu-24.04-arm' }}
name: testing on ${{ matrix.platform }}
timeout-minutes: 360
needs:
- build
- merge
steps:

- name: Test notebooks
shell: bash
run: |
docker run -t ghcr.io/${{ vars.ORG_REPO }}/${{ github.event.repository.name }}:dev bash -c " \
pip install pytest nbmake; \
find . -name '*.ipynb' | pytest --nbmake --nbmake-timeout=3600;"

tags:
runs-on: ubuntu-24.04
if: github.event_name != 'pull_request'
name: add tags
needs:
- build
- tests
steps:
- name: Authenticate with GHCR
id: auth
uses: docker/login-action@v3.5.0
with:
registry: "ghcr.io"
username: ${{github.actor}}
password: ${{secrets.BUILD_TOKEN}}

- name: tag release versions
shell: bash
run: |
docker buildx imagetools create \
--tag ghcr.io/${{ vars.ORG_REPO }}/${{ github.event.repository.name }}:latest \
--tag ghcr.io/${{ vars.ORG_REPO }}/${{ github.event.repository.name }}:${{ needs.build.outputs.tag }} \
ghcr.io/${{ vars.ORG_REPO }}/${{ github.event.repository.name }}:dev
docker buildx imagetools inspect ghcr.io/${{ vars.ORG_REPO }}/${{ github.event.repository.name }}:latest

- name: Post version update to dash
uses: peter-evans/repository-dispatch@v3.0.0
Expand Down