Skip to content

Commit 4aaf393

Browse files
Merge pull request #242 from gustaveroussy/cd/docker-image-build-job
Docker images release job
2 parents f43609d + f13e3ce commit 4aaf393

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/ci.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,38 @@ jobs:
7575

7676
- name: Publish
7777
run: uv publish -t ${{ secrets.PYPI_TOKEN }}
78+
79+
docker-images-release:
80+
needs: [tests]
81+
if: contains(github.ref, 'tags')
82+
name: "Docker images release"
83+
runs-on: ubuntu-latest
84+
strategy:
85+
matrix:
86+
extra-name: ["", "baysor", "cellpose", "proseg", "stardist"]
87+
88+
env:
89+
EXTRA_NAME_SUFFIX: ${{ matrix.extra-name == '' && '' || format('-{0}', matrix.extra-name) }}
90+
91+
steps:
92+
- name: Export tag version
93+
run: |
94+
TAG="${GITHUB_REF#refs/tags/v}"
95+
echo "VERSION=$TAG" >> $GITHUB_ENV
96+
97+
- name: Login to Docker Hub
98+
uses: docker/login-action@v3
99+
with:
100+
username: ${{ vars.DOCKERHUB_USERNAME }}
101+
password: ${{ secrets.DOCKERHUB_TOKEN }}
102+
103+
- name: Set up Docker Buildx
104+
uses: docker/setup-buildx-action@v3
105+
106+
- name: Build and push
107+
uses: docker/build-push-action@v6
108+
with:
109+
push: true
110+
platforms: linux/amd64
111+
tags: ${{ vars.DOCKERHUB_USERNAME }}/sopa:${{ env.VERSION }}${{ env.EXTRA_NAME_SUFFIX }}
112+
context: docker/sopa${{ env.EXTRA_NAME_SUFFIX }}

0 commit comments

Comments
 (0)