Skip to content

Commit 038e521

Browse files
committed
build docker image in self hosted
1 parent 9423167 commit 038e521

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Build Docker Image
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
use_local_freesurfer:
7+
type: boolean
8+
description: 'Use local FreeSurfer binaries instead of downloading'
9+
required: false
10+
default: false
11+
push_to_registry:
12+
type: boolean
13+
description: 'Push the built image to Docker registry'
14+
required: false
15+
default: false
16+
push:
17+
branches: [ main, master ]
18+
tags: [ 'v*' ]
19+
pull_request:
20+
branches: [ main, master ]
21+
22+
jobs:
23+
build-docker:
24+
runs-on: self-hosted
25+
name: Build Docker Image
26+
27+
steps:
28+
- name: Checkout code
29+
uses: actions/checkout@v4
30+
31+
- name: Set up Docker Buildx
32+
uses: docker/setup-buildx-action@v3
33+
34+
- name: Build Docker image
35+
run: |
36+
make dockerbuild USE_LOCAL_FREESURFER=${{ github.event.inputs.use_local_freesurfer || 'False' }}
37+
38+
- name: Push Docker image
39+
if: github.event.inputs.push_to_registry == 'true' || startsWith(github.ref, 'refs/tags/')
40+
run: |
41+
make dockerpush

0 commit comments

Comments
 (0)