Skip to content
This repository was archived by the owner on Jun 30, 2025. It is now read-only.

CU-8699g0f70 master to main rename #169

CU-8699g0f70 master to main rename

CU-8699g0f70 master to main rename #169

Workflow file for this run

name: Docker
on:
push:
branches:
- '**'
tags:
- 'v*.*.*' # e.g., v0.1.1
release:
types: [published]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
outputs:
image_version: ${{ steps.meta.outputs.version }}
steps:
- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Extract metadata (tags, labels) for Docker MedCATservice
id: meta
uses: docker/metadata-action@v5
with:
images: cogstacksystems/medcat-service
tags: |
# set latest tag for default branch
type=raw,value=latest,enable={{is_default_branch}}
# Include all default tags
type=schedule
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
type=sha
- name: Build and push Docker MedCATservice image
id: docker_build
uses: docker/build-push-action@v6
with:
push: true
allow: network.host
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=cogstacksystems/medcat-service:buildcache
cache-to: type=registry,ref=cogstacksystems/medcat-service:buildcache,mode=max
- name: Extract metadata (tags, labels) for Docker MedCATservice-gpu
id: meta-gpu
uses: docker/metadata-action@v5
with:
images: cogstacksystems/medcat-service-gpu
tags: |
# set latest tag for default branch
type=raw,value=latest,enable={{is_default_branch}}
# Include all default tags
type=schedule
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
type=sha
- name: Build and push Docker Jupyter singleuser image with GPU support
id: docker_build_gpu
uses: docker/build-push-action@v6
with:
file : "Dockerfile_gpu"
allow: network.host
tags: ${{ steps.meta-gpu.outputs.tags }}
labels: ${{ steps.meta-gpu.outputs.labels }}
push: true
cache-from: type=registry,ref=cogstacksystems/medcat-service-gpu:buildcache
cache-to: type=registry,ref=cogstacksystems/medcat-service-gpu:buildcache,mode=max
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
integration_test:
runs-on: ubuntu-latest
needs: build
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Run Test with example model pack
run: |
echo "🧪 Running Examples test..."
export IMAGE_TAG=${{ needs.build.outputs.image_version }} # Improve by running exact digest instead
echo "Running with image tag ${IMAGE_TAG}"
bash scripts/test_examples.sh
- name: Report test result
if: always()
run: |
if [ $? -eq 0 ]; then
echo "✅ Integration test PASSED"
else
echo "❌ Integration test FAILED"
exit 1
fi