name: Build docker image

on:
  push:
    branches:
      - pack
      - release
      - docker

jobs:
  docker:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v4
    - name: Login to Docker Hub
      uses: docker/login-action@v3
      with:
        username: ${{ secrets.DOCKERHUB_USERNAME }}
        password: ${{ secrets.DOCKERHUB_TOKEN }}

    - name: Build and push Docker images
      uses: docker/build-push-action@v6
      with:
          file: src/BootstrapBlazor.Server/Dockerfile
          push: true
          tags: argozhang/blazor:latest
