@ (#57) #15
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: docker-allinone | |
| # Build and publish the ALL-IN-ONE image (engine + bundled Postgres + web UI) | |
| # so anyone can `docker run` Vectorless with just an LLM key. | |
| # | |
| # Publishes to Docker Hub AND GitHub Container Registry: | |
| # docker.io/<DOCKERHUB_USERNAME>/vectorless:latest|sha-<short>|vX.Y.Z | |
| # ghcr.io/hallelx2/vectorless:latest|sha-<short>|vX.Y.Z | |
| # | |
| # Requires two repo secrets for the Docker Hub push: | |
| # DOCKERHUB_USERNAME — your Docker Hub account/namespace | |
| # DOCKERHUB_TOKEN — a Docker Hub access token with Read/Write/Delete scope | |
| # (GHCR uses the built-in GITHUB_TOKEN — no extra secret.) | |
| on: | |
| workflow_dispatch: {} # run on demand from the Actions tab / gh CLI | |
| push: | |
| branches: [main] # publish :latest on every push to the default branch | |
| tags: ["v*.*.*"] | |
| permissions: | |
| contents: read | |
| packages: write # push to ghcr.io | |
| jobs: | |
| publish: | |
| name: build + push all-in-one | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Log in to ghcr.io | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract tags + labels | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: | | |
| docker.io/${{ secrets.DOCKERHUB_USERNAME }}/vectorless | |
| ghcr.io/${{ github.repository_owner }}/vectorless | |
| tags: | | |
| type=raw,value=latest,enable={{is_default_branch}} | |
| type=raw,value=latest,enable=${{ github.event_name == 'workflow_dispatch' }} | |
| type=ref,event=tag | |
| type=sha,prefix=sha-,format=short | |
| - name: Build + push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: ./Dockerfile.allinone | |
| platforms: linux/amd64 | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| build-args: | | |
| VERSION=${{ github.ref_name }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max |