name: Build and Push Docker Images on: # Remove active triggers to disable the workflow # push: # branches: [ main ] workflow_dispatch: permissions: contents: read packages: write jobs: build-and-push: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Log in to GitHub Container Registry uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push Backend image uses: docker/build-push-action@v5 with: context: ./backend file: ./backend/Dockerfile push: true tags: ghcr.io/${{ github.repository }}/suna-backend:latest cache-from: type=gha cache-to: type=gha,mode=max - name: Build and push Frontend image uses: docker/build-push-action@v5 with: context: ./frontend file: ./frontend/Dockerfile push: true tags: ghcr.io/${{ github.repository }}/suna-frontend:latest cache-from: type=gha cache-to: type=gha,mode=max