deploy-docker #57
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
name: deploy-docker | |
on: [workflow_dispatch] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Login to Docker | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: get version | |
id: get_tag | |
uses: "WyriHaximus/github-action-get-previous-tag@v1" | |
with: | |
fallback: "dev" | |
- name: Build Docker image GPU | |
run: python Docker/build.py --device cuda --tag girodia/fastsurfer:gpu-${{ steps.get_tag.outputs.tag }} | |
- name: Build Docker image CPU | |
run: python Docker/build.py --device cpu --tag girodia/fastsurfer:cpu-${{ steps.get_tag.outputs.tag }} | |
- name: Push Docker image GPU | |
run: docker push girodia/fastsurfer:gpu-${{ steps.get_tag.outputs.tag }} | |
- name: Push Docker image CPU | |
run: docker push girodia/fastsurfer:cpu-${{ steps.get_tag.outputs.tag }} | |