name: Build Docker Container

on:
  push:
    branches: [ main ]

jobs:
  docker:
    runs-on: ubuntu-latest
    steps:
      -
        name: Set up QEMU
        uses: docker/setup-qemu-action@v1
      -
        name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v1
      - 
        name: Install doctl
        uses: digitalocean/action-doctl@v2
        with:
          token: ${{ secrets.REGISTRY_TOKEN }}
      - 
        name: Log in to DigitalOcean Container Registry with short-lived credentials
        run: doctl registry login --expiry-seconds 600
      -
        name: Build and push
        id: docker_build
        uses: docker/build-push-action@v2
        with:
          push: true
          file: src/SmtpPilot/Dockerfile
          tags: smtppilot:latest

      -
        name: Image digest
        run: echo ${{ steps.docker_build.outputs.digest }}
name: Build Docker Container

on:
  push:
    branches: [ main ]

jobs:
  docker:
    runs-on: ubuntu-latest
    steps:
      -
        name: Set up QEMU
        uses: docker/setup-qemu-action@v1
      -
        name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v1
      -
        name: Login to Container Registry
        uses: docker/login-action@v1 
        with:
          username: ${{ secrets.REGISTRY_TOKEN }}
          password: ${{ secrets.REGISTRY_TOKEN }}
          registry: ${{ secrets.REGISTRY }}
      -
        name: Build and push
        id: docker_build
        uses: docker/build-push-action@v2
        with:
          push: true
          file: src/SmtpPilot/Dockerfile
          tags: smtppilot:latest

      -
        name: Image digest
        run: echo ${{ steps.docker_build.outputs.digest }}
Revert back to normal login
Revert back to normal login
