Skip to content

Commit

Permalink
add docker image version tag
Browse files Browse the repository at this point in the history
  • Loading branch information
nilsmechtel committed Dec 4, 2024
1 parent ee5e388 commit 5cc9150
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 35 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,21 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build and push Docker image (latest tag)
- name: Extract version from project.toml
id: extract_version
run: |
VERSION=$(grep '^version' project.toml | sed -E 's/version *= *"([0-9.]+)"/\1/')
echo "version=$VERSION" >> $GITHUB_ENV
- name: Build and push Docker image (latest and version tags)
uses: docker/[email protected]
with:
context: .
file: Dockerfile
push: true
tags: ghcr.io/${{ github.repository }}:latest
tags: |
ghcr.io/${{ github.repository }}:latest
ghcr.io/${{ github.repository }}:${{ env.version }}
labels: |
org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }}
cache-from: type=gha
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ RUN chmod +x /app/start_service.sh
USER bioimageio_colab

# Use the start script as the entrypoint and forward arguments
ENTRYPOINT ["/app/start_service.sh"]
ENTRYPOINT ["python", "register_sam_service.py"]
32 changes: 0 additions & 32 deletions scripts/build_and_push.sh

This file was deleted.

0 comments on commit 5cc9150

Please sign in to comment.