name: Publish to DockerHub
on:    
  release:
      types: [published]
jobs:
  update:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - name: Publish to Registry
      uses: elgohr/Publish-Docker-Github-Action@master
      with:
        name: taylorbourne/xteve_lazystream
        pre: echo ::save-state name=RELEASE_VERSION::$(echo ${GITHUB_REF:10})
        username: ${{ secrets.DOCKER_USERNAME }}
        password: ${{ secrets.DOCKER_PASSWORD }}
        tags: "latest,${{ env.STATE_RELEASE_VERSION }}"
