name: CD

on:
  push:
    tags:
      - 'v*'

jobs:
  push_image:
      name: Push docker image to dockerhub
      runs-on: ubuntu-latest
      env:
        DATABASE_URL: "sqlite://./dim_dev.db"
      steps:
        - uses: actions/checkout@v2
        - uses: docker/build-push-action@v1
          with:
              username: ${{ secrets.DOCKER_USERNAME }}
              password: ${{ secrets.DOCKER_PASSWORD }}
              repository: vgarleanu/dim
              tag_with_ref: true
