File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -194,3 +194,19 @@ jobs:
194
194
docker-compose -f docker-compose-build.yaml run \
195
195
-e TWINE_USERNAME=${TWINE_USERNAME} -e TWINE_PASSWORD=${TWINE_PASSWORD} app \
196
196
sh -lc "pip install twine && python -m twine upload dist/*"
197
+ - name : Login to DockerHub
198
+ uses : docker/login-action@v1
199
+ with :
200
+ username : ${{secrets.docker_username}}
201
+ password : ${{secrets.docker_password}}
202
+ - name : Publish image
203
+ run : |
204
+ IMAGE=$(docker images --filter "reference=datajoint/datajoint*" --format "{{.Repository}}")
205
+ TAG=$(docker images --filter "reference=datajoint/datajoint*" --format "{{.Tag}}")
206
+ docker push "${IMAGE}:${TAG}"
207
+ docker tag "${IMAGE}:${TAG}" "${IMAGE}:${TAG}-${GITHUB_SHA:0:7}"
208
+ docker push "${IMAGE}:${TAG}-${GITHUB_SHA:0:7}"
209
+ [ "$PY_VER" == "3.10" ] && [ "$DISTRO" == "debian" ] \
210
+ && docker tag "${IMAGE}:${TAG}" "${IMAGE}:latest" \
211
+ && docker push "${IMAGE}:latest" \
212
+ || echo "skipping 'latest' tag..."
You can’t perform that action at this time.
0 commit comments