This repository was archived by the owner on Apr 24, 2026. It is now read-only.
Refactor Dockerfile to streamline build process and ensure correct po… #3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Push agent-manager Image | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: # Run manually from GitHub UI if needed | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 # Full history helps with cache | |
| - name: Debug context (for troubleshooting) | |
| run: | | |
| ls -la . | |
| ls -la agent-manager || echo "agent-manager folder missing!" | |
| ls -la agent-manager/src || echo "src folder missing or empty!" | |
| ls -la agent-manager/src/*.js 2>/dev/null || echo "No JS files found in src" | |
| cat agent-manager/package.json || echo "package.json not found" | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to GHCR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: ./agent-manager | |
| file: ./agent-manager/Dockerfile | |
| push: true | |
| tags: ghcr.io/anentrypoint/agent-manager:latest | |
| no-cache: false # Use cache if available; set true for force clean build | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max |