forked from WU-C2IR2/DR2UNet-for-TNBC-PDX-Tumor-Segmentation
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add github workflow to push to docker
- Loading branch information
1 parent
48958b1
commit 1e7aa3b
Showing
2 changed files
with
56 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Docker Image CI | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
branches: | ||
- develop | ||
|
||
jobs: | ||
|
||
build-and-push: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
flavor: | | ||
latest=false | ||
images: | | ||
xnat/tnbc-pdx-segmentation | ||
tags: | | ||
type=raw,value=latest,event=tag,enable=${{ startsWith(github.ref, 'refs/tags/v') && ! contains(github.ref, 'rc') && ! contains(github.ref, 'beta') && ! contains(github.ref, 'alpha') }} | ||
type=semver,pattern={{version}},event=tag,enable=${{ startsWith(github.ref, 'refs/tags/v') }} | ||
type=raw,value=develop,event=push,enable=${{ github.ref == format('refs/heads/{0}', 'develop') }} | ||
labels: | | ||
org.opencontainers.image.title=Mice Image Splitter | ||
org.opencontainers.image.description=Split multi-subject PET/CT mice images into individual subject images | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
push: true | ||
platforms: linux/amd64 # ,linux/arm64 | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM xnat/tensorflow-notebook:JHP-76 | ||
FROM xnat/tensorflow-notebook:develop | ||
|
||
USER root | ||
|
||
|