name: Build and Push Docker Image on: push: branches: [ "main", "master" ] workflow_dispatch: # این خط به شما دکمه اجرای دستی در پنل گیت‌هاب می‌دهد jobs: build: runs-on: ubuntu-latest steps: - name: Check out the repo uses: actions/checkout@v3 - name: Log in to Docker Hub uses: docker/login-action@v2 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push Docker image uses: docker/build-push-action@v4 with: context: . push: true tags: ${{ secrets.DOCKERHUB_USERNAME }}/emma-assistant:latest