@@ -45,31 +45,32 @@ jobs:
4545 files : coverage.xml
4646
4747 pypi :
48- needs : test
49- if : startsWith(github.ref, 'refs/tags/')
50- runs-on : ubuntu-latest
51- permissions :
52- contents : read
53- id-token : write
54- steps :
55- - name : Checkout repository
56- uses : actions/checkout@v4
57- with :
58- fetch-depth : 0
59-
60- - name : Setup Python
61- uses : actions/setup-python@v5
62- with :
63- python-version : " 3.8"
64-
65- - name : Build package
66- run : |
67- python -m pip install --upgrade pip
68- python -m pip install build
69- python -m build .
70-
71- - name : Publish package
72- uses : pypa/gh-action-pypi-publish@release/v1
48+ needs : test
49+ if : startsWith(github.ref, 'refs/tags')
50+ runs-on : ubuntu-latest-m
51+ steps :
52+
53+ - name : Checkout repository
54+ uses : actions/checkout@v3
55+ with :
56+ fetch-depth : 0
57+
58+ - name : Setup Python
59+ uses : actions/setup-python@v4
60+ with :
61+ python-version : 3.8
62+
63+ - name : Build package
64+ run : |
65+ python -m pip install --upgrade pip
66+ python -m pip install build
67+ python -m build .
68+
69+ - name : Publish package
70+ uses : pypa/gh-action-pypi-publish@release/v1
71+ with :
72+ user : __token__
73+ password : ${{ secrets.PYPI_API_TOKEN }}
7374
7475 ghcr :
7576 needs : test
@@ -103,6 +104,8 @@ jobs:
103104 registry : ghcr.io
104105 username : ${{ github.actor }}
105106 password : ${{ secrets.GITHUB_TOKEN }}
107+
108+ # steinbock
106109
107110 - name : Create steinbock container metadata
108111 id : steinbock_container_meta
@@ -120,10 +123,64 @@ jobs:
120123 context : .
121124 push : true
122125 target : steinbock
123- platforms : linux/amd64,linux/arm64
124126 build-args : |
125127 TENSORFLOW_TARGET=tensorflow
126128 STEINBOCK_TARGET=steinbock
127129 STEINBOCK_VERSION=${{ steps.steinbock_meta.outputs.version }}
128130 tags : ${{ steps.steinbock_container_meta.outputs.tags }}
129- labels : ${{ steps.steinbock_container_meta.outputs.labels }}
131+ labels : ${{ steps.steinbock_container_meta.outputs.labels }}
132+
133+
134+ # steinbock-gpu
135+
136+ - name : Create steinbock-gpu container metadata
137+ uses : docker/metadata-action@v4
138+ id : steinbock_gpu_container_meta
139+ with :
140+ images : ghcr.io/${{ github.repository }}
141+ flavor : |
142+ suffix=-gpu,onlatest=true
143+ tags : |
144+ type=semver,pattern={{major}}
145+ type=semver,pattern={{major}}.{{minor}}
146+ type=semver,pattern={{major}}.{{minor}}.{{patch}}
147+
148+ - name : Build and publish steinbock-gpu container
149+ uses : docker/build-push-action@v3
150+ with :
151+ context : .
152+ push : true
153+ target : steinbock
154+ build-args : |
155+ TENSORFLOW_TARGET=tensorflow-gpu
156+ STEINBOCK_TARGET=steinbock
157+ STEINBOCK_VERSION=${{ steps.steinbock_meta.outputs.version }}
158+ tags : ${{ steps.steinbock_gpu_container_meta.outputs.tags }}
159+ labels : ${{ steps.steinbock_gpu_container_meta.outputs.labels }}
160+
161+
162+ # steinbock cellpose
163+
164+ - name : Create steinbock-cellpose container metadata
165+ uses : docker/metadata-action@v4
166+ id : steinbock_cellpose_container_meta
167+ with :
168+ images : ghcr.io/${{ github.repository }}
169+ flavor : |
170+ suffix=-cellpose,onlatest=true
171+ tags : |
172+ type=semver,pattern={{major}}
173+ type=semver,pattern={{major}}.{{minor}}
174+ type=semver,pattern={{major}}.{{minor}}.{{patch}}
175+
176+ - name : Build and publish steinbock-cellpose container
177+ uses : docker/build-push-action@v3
178+ with :
179+ context : .
180+ push : true
181+ target : steinbock-cellpose
182+ build-args : |
183+ STEINBOCK_TARGET=steinbock-cellpose
184+ STEINBOCK_VERSION=${{ steps.steinbock_meta.outputs.version }}
185+ tags : ${{ steps.steinbock_cellpose_container_meta.outputs.tags }}
186+ labels : ${{ steps.steinbock_cellpose_container_meta.outputs.labels }}
0 commit comments