|
24 | 24 | workflow_dispatch: |
25 | 25 | inputs: |
26 | 26 | docker-image: |
27 | | - name: 'Docker image to run with' |
28 | 27 | description: 'Which docker image should be used to run this test (build-cached => build from git)' |
29 | 28 | default: build-cached |
30 | 29 | type: string |
| 30 | + freesurfer_build_image: |
| 31 | + description: 'FreeSurfer build image to build with' |
| 32 | + type: string |
31 | 33 |
|
32 | 34 | env: |
33 | 35 | SUBJECTS_DIR: /tmp/subjects |
@@ -99,13 +101,29 @@ jobs: |
99 | 101 | steps: |
100 | 102 | - name: Checkout repository |
101 | 103 | uses: actions/checkout@v4 |
| 104 | + - name: Get the FreeSurfer version |
| 105 | + shell: bash |
| 106 | + run: | |
| 107 | + # get the FreeSurfer verson from install_fs_pruned.sh |
| 108 | + { |
| 109 | + eval "$(grep "^fslink=" ./Docker/install_fs_pruned.sh)" |
| 110 | + fs_version="$(basename "$(dirname "$fslink")")" |
| 111 | + fs_version_short="${fs_version//\./}" |
| 112 | + echo "FS_VERSION=$fs_version" |
| 113 | + echo "FS_VERSION_SHORT=$fs_version_short" |
| 114 | + if [[ -n "${{ inputs.freesurfer_build_image }}" ]] ; then |
| 115 | + echo "FS_BUILD_IMAGE=${{ inputs.freesurfer_build_image }}" |
| 116 | + else |
| 117 | + echo "FS_BUILD_IMAGE=deepmi/fastsurfer-build:freesurfer$fs_version_short" |
| 118 | + fi |
| 119 | + } > $GITHUB_ENV |
102 | 120 | - uses: ./.github/actions/build-docker@dev |
103 | 121 | # This action needs the "full" checkout (located at ${{ inputs.fastsurfer-home }}) |
104 | 122 | with: |
105 | 123 | fastsurfer-home: . |
106 | 124 | # currently, this image has to be updated and used to circumvent storage limitations in github actions |
107 | 125 | # and it is also faster to use this prebuilt, reduced-size freesurfer distribution |
108 | | - freesurfer-build-image: dkuegler/fastsurfer:fs741-build-image |
| 126 | + freesurfer-build-image: "${{ env.FS_BUILD_IMAGE }}" |
109 | 127 | run-1mm: |
110 | 128 | name: 'Run FastSurfer on the 1mm sample image' |
111 | 129 | needs: build-docker-latest |
|
0 commit comments