Skip to content

Commit a000faa

Browse files
m-reuteragirodi
andauthored
add dockerhub deployment workflow (#278) (#417)
Co-authored-by: Andreas Girodi <87191977+agirodi@users.noreply.github.com>
1 parent 9f37d02 commit a000faa

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: deploy-docker
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
8+
jobs:
9+
deploy-gpu:
10+
runs-on: ubuntu-latest
11+
timeout-minutes: 120
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v3
15+
with:
16+
fetch-depth: 0
17+
- name: Login to Docker
18+
uses: docker/login-action@v2
19+
with:
20+
username: ${{ secrets.DOCKERHUB_USERNAME }}
21+
password: ${{ secrets.DOCKERHUB_TOKEN }}
22+
- name: Set up Docker Buildx
23+
uses: docker/setup-buildx-action@v2
24+
- name: Build Docker image GPU
25+
run: python Docker/build.py --device cuda --tag ${{ secrets.DOCKERHUB_USERNAME }}/fastsurfer:gpu-${{ github.event.release.tag_name }}
26+
- name: Add additional tags
27+
run: |
28+
docker tag ${{ secrets.DOCKERHUB_USERNAME }}/fastsurfer:gpu-${{ github.event.release.tag_name }} ${{ secrets.DOCKERHUB_USERNAME }}/fastsurfer:gpu-latest
29+
docker tag ${{ secrets.DOCKERHUB_USERNAME }}/fastsurfer:gpu-${{ github.event.release.tag_name }} ${{ secrets.DOCKERHUB_USERNAME }}/fastsurfer:latest
30+
- name: Push Docker image GPU
31+
run: docker push --all-tags ${{ secrets.DOCKERHUB_USERNAME }}/fastsurfer:gpu-${{ github.event.release.tag_name }}
32+
deploy-cpu:
33+
runs-on: ubuntu-latest
34+
timeout-minutes: 120
35+
steps:
36+
- name: Checkout repository
37+
uses: actions/checkout@v3
38+
with:
39+
fetch-depth: 0
40+
- name: Login to Docker
41+
uses: docker/login-action@v2
42+
with:
43+
username: ${{ secrets.DOCKERHUB_USERNAME }}
44+
password: ${{ secrets.DOCKERHUB_TOKEN }}
45+
- name: Set up Docker Buildx
46+
uses: docker/setup-buildx-action@v2
47+
- name: Build Docker image CPU
48+
run: python Docker/build.py --device cpu --tag ${{ secrets.DOCKERHUB_USERNAME }}/fastsurfer:cpu-${{ github.event.release.tag_name }}
49+
- name: Add additional tags
50+
run: |
51+
docker tag ${{ secrets.DOCKERHUB_USERNAME }}/fastsurfer:cpu-${{ github.event.release.tag_name }} ${{ secrets.DOCKERHUB_USERNAME }}/fastsurfer:cpu-latest
52+
- name: Push Docker image CPU
53+
run: docker push --all-tags ${{ secrets.DOCKERHUB_USERNAME }}/fastsurfer:cpu-${{ github.event.release.tag_name }}
54+

0 commit comments

Comments
 (0)