File tree Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change 5
5
branches :
6
6
- main
7
7
pull_request :
8
+ types : [opened, synchronize, edited]
8
9
branches :
9
10
- main
11
+ - " docker/**"
10
12
11
13
jobs :
12
14
build-and-run-docker :
@@ -19,15 +21,28 @@ jobs:
19
21
- name : Set up Docker Buildx
20
22
uses : docker/setup-buildx-action@v3
21
23
22
- # Build the Docker image
23
24
- name : Build Docker image
24
25
run : |
25
26
docker build -t tf2.4_ivim-mri_codecollection -f Docker/Dockerfile .
26
27
27
- # Run the Docker container
28
+ - name : Save Docker image to a tarball
29
+ run : |
30
+ docker save -o tf2.4_ivim-mri_codecollection.tar tf2.4_ivim-mri_codecollection
31
+
32
+ - name : Upload Docker image artifact
33
+ uses : actions/upload-artifact@v4
34
+ with :
35
+ name : docker-image
36
+ path : tf2.4_ivim-mri_codecollection.tar
37
+
28
38
- name : Run Docker container
29
39
run : |
30
- docker run -it - -rm --name TF2.4_IVIM-MRI_CodeCollection \
40
+ docker run --rm --name TF2.4_IVIM-MRI_CodeCollection \
31
41
-v ${{ github.workspace }}:/usr/src/app \
32
42
-v ${{ github.workspace }}:/usr/app/output \
33
43
tf2.4_ivim-mri_codecollection brain.nii.gz brain.bvec brain.bval
44
+
45
+ - name : Clean up
46
+ run : |
47
+ docker rmi tf2.4_ivim-mri_codecollection
48
+ rm tf2.4_ivim-mri_codecollection.tar
You can’t perform that action at this time.
0 commit comments