name: 构建base镜像
on:
  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-latest
    name: 构建镜像：chinesesubfinder-base
    steps:
      - 
        name: Checkout
        uses: actions/checkout@master
      
      - 
        name: Set Up QEMU
        uses: docker/setup-qemu-action@v2

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

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

      - 
        name: Buildx
        uses: docker/build-push-action@v3
        with:
          context: docker
          file: docker/full-base.Dockerfile
          platforms: |
            linux/amd64
            linux/arm64
            linux/arm/v7
          push: true
          tags: |
            ${{ secrets.DOCKER_USERNAME }}/chinesesubfinder-base:latest
