Push to DO update docker-image.yml #14
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: Docker Image CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Login to DigitalOcean Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: registry.digitalocean.com | |
username: ${{ secrets.DIGITALOCEAN_USERNAME }} | |
password: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }} | |
- uses: actions/checkout@v3 | |
- name: Download BlazeFace | |
uses: actions/checkout@v3 | |
with: | |
repository: 'hollance/BlazeFace-PyTorch' | |
path: 'model/blazeface' | |
- name: Build the Docker image | |
run: docker build . --file build/Dockerfile --tag thesmile:$(date +%Y%m%d-%s) --tag thesmile:latest | |
- name: Tag for DO | |
run: docker image tag thesmile:latest registry.digitalocean.com/thesmile/thesmile:latest | |
- name: Push to DO | |
run: docker push registry.digitalocean.com/thesmile/thesmile:latest | |