name: Scheduled Docker Build to Local Registry

on:
  workflow_dispatch:     # Разрешить ручной запуск

jobs:
  build-and-push:
    runs-on: [ "ubuntu-latest" ]
    
    steps:
    - name: Checkout code
      uses: actions/checkout@v3
      
    - name: Set up Docker Buildx
      uses: docker/setup-buildx-action@v2
      
    - name: Build Docker image
      uses: docker/build-push-action@v4
      with:
        context: .
        tags: 192.168.0.145:5000/alt-atomic-niri:latest
        push: false  # Пока не пушим
        
    - name: Push to Local Registry
      run: |
        docker push 192.168.0.145:5000/alt-atomic-niri:latest
      shell: bash
