name: Docker Snapshot

on:
  push:
    branches-ignore:
      - main

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      -
        name: Checkout
        uses: actions/checkout@v4
      -
        name: Login to DockerHub
        uses: docker/login-action@v3
        with:
          username: ${{ secrets.DOCKER_USERNAME }}
          password: ${{ secrets.DOCKER_PASSWORD }}
      -
        name: Build
        uses: docker/build-push-action@v6
        with:
          file: Dockerfile
          context: .
          platforms: linux/amd64
          push: false
          build-args: |
            BUILD_PIPELINE=1
            CHECK_3RD_API=${{ vars.CHECK_3RD_API }}
            SKIP_TESTS=${{ vars.SKIP_TESTS }}
