Files
Jamison Lahman 8950eadc06 Release code-interpreter 0.4.4 (#63)
* Release code-interpreter 0.4.4

Bump code-interpreter and executor to 0.4.4 (FastAPI/Starlette upgrade,
configurable executor Docker network, dependency bumps since 0.4.3).

Also publish a versioned image tag from docker-build-push.yml so
consumers can pin a specific release instead of tracking :latest. The
build runs via workflow_dispatch on main, where type=semver yields no
tag, so the version is read from pyproject.toml and emitted via
type=raw alongside :latest.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* nit

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 11:06:21 -07:00

99 lines
2.8 KiB
YAML

name: Build and Push Docker Images
on:
push:
tags:
- 'v*'
workflow_dispatch:
env:
DOCKERHUB_USERNAME: onyxdotapp
jobs:
build-executor:
name: Build and Push Executor Image
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ env.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Read version from pyproject
id: version
run: echo "version=$(grep -m1 '^version = ' executor/pyproject.toml | cut -d'"' -f2)" >> "$GITHUB_OUTPUT"
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.DOCKERHUB_USERNAME }}/python-executor-sci
tags: |
type=semver,pattern={{version}}
type=raw,value=${{ steps.version.outputs.version }}
type=raw,value=latest
- name: Build and push executor image
uses: docker/build-push-action@v5
with:
context: ./executor
file: ./executor/Dockerfile
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-code-interpreter:
name: Build and Push Code Interpreter Image
runs-on: ubuntu-latest
needs: build-executor
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ env.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Read version from pyproject
id: version
run: echo "version=$(grep -m1 '^version = ' code-interpreter/pyproject.toml | cut -d'"' -f2)" >> "$GITHUB_OUTPUT"
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.DOCKERHUB_USERNAME }}/code-interpreter
tags: |
type=semver,pattern={{version}}
type=raw,value=${{ steps.version.outputs.version }}
type=raw,value=latest
- name: Build and push code-interpreter image
uses: docker/build-push-action@v5
with:
context: ./code-interpreter
file: ./code-interpreter/Dockerfile
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max