This repository was archived by the owner on Jun 30, 2025. It is now read-only.
Env var + script updates. #166
This file contains hidden or 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: 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 | |
| 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 }} |