Skip to content

Document KDTree backend status: flag pykdtree for removal, nanoflann … #14

Document KDTree backend status: flag pykdtree for removal, nanoflann …

Document KDTree backend status: flag pykdtree for removal, nanoflann … #14

Workflow file for this run

name: "GHCR: Binder Base Image"
# Builds the Underworld3 binder-ready Docker image and pushes to GHCR
# The image is used by mybinder.org via the uw3-binder-launcher repository
#
# This is separate from docker-image.yml which builds command-line Docker
# images (also on GHCR, different image name).
on:
push:
branches: [main, development]
tags: ['v*'] # Build on release tags (v3.0.0, v3.1.0, etc.)
paths:
# Only rebuild when these files change (Cython/dependencies require rebuild)
# Note: path filters are ignored for tag pushes (GitHub always triggers on tags)
- 'container/Dockerfile.base.optimized'
- 'pixi.toml'
- 'pixi.lock'
- 'src/**/*.pyx'
- 'src/**/*.c'
- 'setup.py'
workflow_dispatch:
inputs:
force_rebuild:
description: 'Force full rebuild (no cache)'
type: boolean
default: false
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract ref name and type
run: |
REF_NAME=${GITHUB_REF##*/}
echo "REF_NAME=${REF_NAME}" >> $GITHUB_ENV
if [[ "$GITHUB_REF" == refs/tags/* ]]; then
echo "IS_RELEASE=true" >> $GITHUB_ENV
else
echo "IS_RELEASE=false" >> $GITHUB_ENV
fi
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: container/Dockerfile.base.optimized
push: true
platforms: linux/amd64
no-cache: ${{ inputs.force_rebuild || false }}
tags: |
ghcr.io/underworldcode/uw3-base:${{ env.REF_NAME }}-slim
${{ env.IS_RELEASE == 'true' && 'ghcr.io/underworldcode/uw3-base:latest-slim' || '' }}
# Trigger launcher repo to update/create its branch
# For branches: updates existing .binder/Dockerfile
# For tags: creates a new launcher branch with frozen Dockerfile
# Requires LAUNCHER_PAT secret (Personal Access Token with repo scope)
- name: Trigger launcher update
if: success()
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.LAUNCHER_PAT }}
repository: underworldcode/uw3-binder-launcher
event-type: image-updated
client-payload: '{"ref": "${{ env.REF_NAME }}", "is_release": "${{ env.IS_RELEASE }}"}'