name: Docker Image CI

on:
  push:
    branches:
      - main
  workflow_dispatch: {}

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Login to Docker Hub
      uses: docker/login-action@v1
      with:
        username: ${{ secrets.DockerHubUsername }}
        password: ${{ secrets.DockerHubPassword }}
    - name: Set up Docker Buildx
      id: buildx
      uses: docker/setup-buildx-action@master
    - name: Build and push
      id: docker_build
      uses: docker/build-push-action@v2
      with:
        target: production
        tags: |
          neinteractiveliterature/intercode:latest
          neinteractiveliterature/intercode:${{ github.sha }}
        cache-from: type=gha
        cache-to: type=gha,mode=max

name: Docker Image CI

on:
  push:
    branches:
      - main
  workflow_dispatch: {}

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Login to Docker Hub
      uses: docker/login-action@v1
      with:
        username: ${{ secrets.DockerHubUsername }}
        password: ${{ secrets.DockerHubPassword }}
    - name: Set up Docker Buildx
      id: buildx
      uses: docker/setup-buildx-action@master
    - name: Build and push
      id: docker_build
      uses: docker/build-push-action@v2
      with:
        context: .
        push: true
        target: production
        tags: |
          neinteractiveliterature/intercode:latest
          neinteractiveliterature/intercode:${{ github.sha }}
        cache-from: type=gha
        cache-to: type=gha,mode=max

Use local checkout, push result
Use local checkout, push result
