name: ci
on: [push]
jobs:
  ci:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3

      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v2

      - name: Login to DockerHub
        uses: docker/login-action@v2
        with:
          username: ${{ secrets.DOCKER_USERNAME }}
          password: ${{ secrets.DOCKER_PASSWORD }}

      - name: Build and conditionally push
        uses: docker/build-push-action@v3
        with:
          context: .
          push: ${{ github.ref == 'refs/heads/master' }}
          tags: blindernuka/billett-backend:latest
          cache-from: type=gha
          cache-to: type=gha,mode=max

Add GitHub Action to build Docker image
Add GitHub Action to build Docker image
