name: Docker Image CI

on: [push]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - name: Build the Docker image
        env:
          DOCKER_USER: ${{ secrets.DOCKER_USERNAME }}
          DOCKER_PASS: ${{ secrets.DOCKER_PASSWORD }}
        run: |
          docker login -u ${DOCKER_USER} -p ${DOCKER_PASS}
          VERSION=${GITHUB_REF#"refs/heads/"} COMMIT_SHA=${GITHUB_SHA} INITIATOR=${GITHUB_ACTOR} make publish
