name: Build and push Docker image

on:
  push:
    branches:
      - master
      - develop
      - release/*
      - hotfix/*
    paths-ignore:
      - '/.github/**'

  pull_request:
    paths-ignore:
      - '/.github/**'

jobs:
  build_and_push:
    runs-on: ubuntu-18.04
    if: (contains(github.event.head_commit.message, '[skip ci]') == false) && (github.event_name == 'push')

    steps:
      - uses: actions/checkout@v2

      - name: Build image
        run: make build
       
      - name: Log into registry
        uses: azure/docker-login@v1
        with:
          login-server: index.docker.io
          username: ${{ secrets.DOCKER_USERNAME }}
          password: ${{ secrets.DOCKER_TOKEN }}

      - name: Push image
        run: make push

      - name: Cleanup
        run: make clean

name: Build and push Docker image

on:
  push:
    branches:
      - master
      - develop
      - release/*
      - hotfix/*

  pull_request:

jobs:
  build_and_push:
    runs-on: ubuntu-18.04
    if: (contains(github.event.head_commit.message, '[skip ci]') == false) && (github.event_name == 'push')
    steps:
      - uses: actions/checkout@v2

      - name: Build image
        run: make build

      - name: Log into registry
        run: echo "${{ secrets.DOCKER_TOKEN }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin

      - name: Push image
        run: make push

      - name: Cleanup
        run: make clean

Remove the use of the github action for docker login and ignorring of .github folder.
Remove the use of the github action for docker login and ignorring of .github folder.
