diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 090a69db..67ebe0dc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,20 +5,33 @@ on: types: [published] jobs: - deploy: + build: if: github.repository == 'arc53/DocsGPT' - runs-on: ubuntu-latest + strategy: + matrix: + include: + - platform: linux/amd64 + runner: ubuntu-latest + suffix: amd64 + - platform: linux/arm64 + runner: ubuntu-24.04-arm + suffix: arm64 + runs-on: ${{ matrix.runner }} permissions: contents: read packages: write steps: - uses: actions/checkout@v4 - - name: Set up QEMU + - name: Set up QEMU # Only needed for emulation, not for native arm64 builds + if: matrix.platform == 'linux/arm64' uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + with: + driver: docker-container + install: true - name: Login to DockerHub uses: docker/login-action@v3 @@ -33,15 +46,67 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Build and push Docker images to docker.io and ghcr.io + - name: Build and push platform-specific images uses: docker/build-push-action@v6 with: file: './application/Dockerfile' - platforms: linux/amd64 + platforms: ${{ matrix.platform }} context: ./application push: true tags: | - ${{ secrets.DOCKER_USERNAME }}/docsgpt:${{ github.event.release.tag_name }},${{ secrets.DOCKER_USERNAME }}/docsgpt:latest - ghcr.io/${{ github.repository_owner }}/docsgpt:${{ github.event.release.tag_name }},ghcr.io/${{ github.repository_owner }}/docsgpt:latest + ${{ secrets.DOCKER_USERNAME }}/docsgpt:${{ github.event.release.tag_name }}-${{ matrix.suffix }} + ghcr.io/${{ github.repository_owner }}/docsgpt:${{ github.event.release.tag_name }}-${{ matrix.suffix }} + provenance: false + sbom: false cache-from: type=registry,ref=${{ secrets.DOCKER_USERNAME }}/docsgpt:latest cache-to: type=inline + + manifest: + if: github.repository == 'arc53/DocsGPT' + needs: build + runs-on: ubuntu-latest + permissions: + packages: write + steps: + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + with: + driver: docker-container + install: true + + - name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Login to ghcr.io + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Create and push manifest for DockerHub + run: | + set -e + docker manifest create ${{ secrets.DOCKER_USERNAME }}/docsgpt:${{ github.event.release.tag_name }} \ + --amend ${{ secrets.DOCKER_USERNAME }}/docsgpt:${{ github.event.release.tag_name }}-amd64 \ + --amend ${{ secrets.DOCKER_USERNAME }}/docsgpt:${{ github.event.release.tag_name }}-arm64 + docker manifest push ${{ secrets.DOCKER_USERNAME }}/docsgpt:${{ github.event.release.tag_name }} + docker manifest create ${{ secrets.DOCKER_USERNAME }}/docsgpt:latest \ + --amend ${{ secrets.DOCKER_USERNAME }}/docsgpt:${{ github.event.release.tag_name }}-amd64 \ + --amend ${{ secrets.DOCKER_USERNAME }}/docsgpt:${{ github.event.release.tag_name }}-arm64 + docker manifest push ${{ secrets.DOCKER_USERNAME }}/docsgpt:latest + + - name: Create and push manifest for ghcr.io + run: | + set -e + docker manifest create ghcr.io/${{ github.repository_owner }}/docsgpt:${{ github.event.release.tag_name }} \ + --amend ghcr.io/${{ github.repository_owner }}/docsgpt:${{ github.event.release.tag_name }}-amd64 \ + --amend ghcr.io/${{ github.repository_owner }}/docsgpt:${{ github.event.release.tag_name }}-arm64 + docker manifest push ghcr.io/${{ github.repository_owner }}/docsgpt:${{ github.event.release.tag_name }} + docker manifest create ghcr.io/${{ github.repository_owner }}/docsgpt:latest \ + --amend ghcr.io/${{ github.repository_owner }}/docsgpt:${{ github.event.release.tag_name }}-amd64 \ + --amend ghcr.io/${{ github.repository_owner }}/docsgpt:${{ github.event.release.tag_name }}-arm64 + docker manifest push ghcr.io/${{ github.repository_owner }}/docsgpt:latest \ No newline at end of file diff --git a/.github/workflows/cife.yml b/.github/workflows/cife.yml index 711cab29..1118723f 100644 --- a/.github/workflows/cife.yml +++ b/.github/workflows/cife.yml @@ -5,20 +5,33 @@ on: types: [published] jobs: - deploy: + build: if: github.repository == 'arc53/DocsGPT' - runs-on: ubuntu-latest + strategy: + matrix: + include: + - platform: linux/amd64 + runner: ubuntu-latest + suffix: amd64 + - platform: linux/arm64 + runner: ubuntu-24.04-arm + suffix: arm64 + runs-on: ${{ matrix.runner }} permissions: contents: read packages: write steps: - uses: actions/checkout@v4 - - name: Set up QEMU + - name: Set up QEMU # Only needed for emulation, not for native arm64 builds + if: matrix.platform == 'linux/arm64' uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + with: + driver: docker-container + install: true - name: Login to DockerHub uses: docker/login-action@v3 @@ -33,16 +46,67 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - # Runs a single command using the runners shell - - name: Build and push Docker images to docker.io and ghcr.io + - name: Build and push platform-specific images uses: docker/build-push-action@v6 with: file: './frontend/Dockerfile' - platforms: linux/amd64, linux/arm64 + platforms: ${{ matrix.platform }} context: ./frontend push: true tags: | - ${{ secrets.DOCKER_USERNAME }}/docsgpt-fe:${{ github.event.release.tag_name }},${{ secrets.DOCKER_USERNAME }}/docsgpt-fe:latest - ghcr.io/${{ github.repository_owner }}/docsgpt-fe:${{ github.event.release.tag_name }},ghcr.io/${{ github.repository_owner }}/docsgpt-fe:latest + ${{ secrets.DOCKER_USERNAME }}/docsgpt-fe:${{ github.event.release.tag_name }}-${{ matrix.suffix }} + ghcr.io/${{ github.repository_owner }}/docsgpt-fe:${{ github.event.release.tag_name }}-${{ matrix.suffix }} + provenance: false + sbom: false cache-from: type=registry,ref=${{ secrets.DOCKER_USERNAME }}/docsgpt-fe:latest cache-to: type=inline + + manifest: + if: github.repository == 'arc53/DocsGPT' + needs: build + runs-on: ubuntu-latest + permissions: + packages: write + steps: + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + with: + driver: docker-container + install: true + + - name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Login to ghcr.io + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Create and push manifest for DockerHub + run: | + set -e + docker manifest create ${{ secrets.DOCKER_USERNAME }}/docsgpt-fe:${{ github.event.release.tag_name }} \ + --amend ${{ secrets.DOCKER_USERNAME }}/docsgpt-fe:${{ github.event.release.tag_name }}-amd64 \ + --amend ${{ secrets.DOCKER_USERNAME }}/docsgpt-fe:${{ github.event.release.tag_name }}-arm64 + docker manifest push ${{ secrets.DOCKER_USERNAME }}/docsgpt-fe:${{ github.event.release.tag_name }} + docker manifest create ${{ secrets.DOCKER_USERNAME }}/docsgpt-fe:latest \ + --amend ${{ secrets.DOCKER_USERNAME }}/docsgpt-fe:${{ github.event.release.tag_name }}-amd64 \ + --amend ${{ secrets.DOCKER_USERNAME }}/docsgpt-fe:${{ github.event.release.tag_name }}-arm64 + docker manifest push ${{ secrets.DOCKER_USERNAME }}/docsgpt-fe:latest + + - name: Create and push manifest for ghcr.io + run: | + set -e + docker manifest create ghcr.io/${{ github.repository_owner }}/docsgpt-fe:${{ github.event.release.tag_name }} \ + --amend ghcr.io/${{ github.repository_owner }}/docsgpt-fe:${{ github.event.release.tag_name }}-amd64 \ + --amend ghcr.io/${{ github.repository_owner }}/docsgpt-fe:${{ github.event.release.tag_name }}-arm64 + docker manifest push ghcr.io/${{ github.repository_owner }}/docsgpt-fe:${{ github.event.release.tag_name }} + docker manifest create ghcr.io/${{ github.repository_owner }}/docsgpt-fe:latest \ + --amend ghcr.io/${{ github.repository_owner }}/docsgpt-fe:${{ github.event.release.tag_name }}-amd64 \ + --amend ghcr.io/${{ github.repository_owner }}/docsgpt-fe:${{ github.event.release.tag_name }}-arm64 + docker manifest push ghcr.io/${{ github.repository_owner }}/docsgpt-fe:latest \ No newline at end of file diff --git a/.github/workflows/docker-develop-build.yml b/.github/workflows/docker-develop-build.yml index 5a22b1a1..44a61769 100644 --- a/.github/workflows/docker-develop-build.yml +++ b/.github/workflows/docker-develop-build.yml @@ -1,4 +1,4 @@ -name: Build and push DocsGPT Docker image for development +name: Build and push multi-arch DocsGPT Docker image on: workflow_dispatch: @@ -7,27 +7,36 @@ on: - main jobs: - deploy: + build: if: github.repository == 'arc53/DocsGPT' - runs-on: ubuntu-latest + strategy: + matrix: + include: + - platform: linux/amd64 + runner: ubuntu-latest + suffix: amd64 + - platform: linux/arm64 + runner: ubuntu-24.04-arm + suffix: arm64 + runs-on: ${{ matrix.runner }} permissions: contents: read packages: write steps: - uses: actions/checkout@v4 - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + with: + driver: docker-container + install: true - name: Login to DockerHub uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - + - name: Login to ghcr.io uses: docker/login-action@v3 with: @@ -35,15 +44,57 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Build and push Docker images to docker.io and ghcr.io + - name: Build and push platform-specific images uses: docker/build-push-action@v6 with: file: './application/Dockerfile' - platforms: linux/amd64 + platforms: ${{ matrix.platform }} context: ./application push: true tags: | - ${{ secrets.DOCKER_USERNAME }}/docsgpt:develop - ghcr.io/${{ github.repository_owner }}/docsgpt:develop + ${{ secrets.DOCKER_USERNAME }}/docsgpt:develop-${{ matrix.suffix }} + ghcr.io/${{ github.repository_owner }}/docsgpt:develop-${{ matrix.suffix }} + provenance: false + sbom: false cache-from: type=registry,ref=${{ secrets.DOCKER_USERNAME }}/docsgpt:develop cache-to: type=inline + + manifest: + if: github.repository == 'arc53/DocsGPT' + needs: build + runs-on: ubuntu-latest + permissions: + packages: write + steps: + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + with: + driver: docker-container + install: true + + - name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Login to ghcr.io + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Create and push manifest for DockerHub + run: | + docker manifest create ${{ secrets.DOCKER_USERNAME }}/docsgpt:develop \ + --amend ${{ secrets.DOCKER_USERNAME }}/docsgpt:develop-amd64 \ + --amend ${{ secrets.DOCKER_USERNAME }}/docsgpt:develop-arm64 + docker manifest push ${{ secrets.DOCKER_USERNAME }}/docsgpt:develop + + - name: Create and push manifest for ghcr.io + run: | + docker manifest create ghcr.io/${{ github.repository_owner }}/docsgpt:develop \ + --amend ghcr.io/${{ github.repository_owner }}/docsgpt:develop-amd64 \ + --amend ghcr.io/${{ github.repository_owner }}/docsgpt:develop-arm64 + docker manifest push ghcr.io/${{ github.repository_owner }}/docsgpt:develop \ No newline at end of file diff --git a/.github/workflows/docker-develop-fe-build.yml b/.github/workflows/docker-develop-fe-build.yml index 317635bd..df7bdac6 100644 --- a/.github/workflows/docker-develop-fe-build.yml +++ b/.github/workflows/docker-develop-fe-build.yml @@ -7,20 +7,33 @@ on: - main jobs: - deploy: + build: if: github.repository == 'arc53/DocsGPT' - runs-on: ubuntu-latest + strategy: + matrix: + include: + - platform: linux/amd64 + runner: ubuntu-latest + suffix: amd64 + - platform: linux/arm64 + runner: ubuntu-24.04-arm + suffix: arm64 + runs-on: ${{ matrix.runner }} permissions: contents: read packages: write steps: - uses: actions/checkout@v4 - - name: Set up QEMU + - name: Set up QEMU # Only needed for emulation, not for native arm64 builds + if: matrix.platform == 'linux/arm64' uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + with: + driver: docker-container + install: true - name: Login to DockerHub uses: docker/login-action@v3 @@ -35,15 +48,57 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Build and push Docker images to docker.io and ghcr.io + - name: Build and push platform-specific images uses: docker/build-push-action@v6 with: file: './frontend/Dockerfile' - platforms: linux/amd64 + platforms: ${{ matrix.platform }} context: ./frontend push: true tags: | - ${{ secrets.DOCKER_USERNAME }}/docsgpt-fe:develop - ghcr.io/${{ github.repository_owner }}/docsgpt-fe:develop + ${{ secrets.DOCKER_USERNAME }}/docsgpt-fe:develop-${{ matrix.suffix }} + ghcr.io/${{ github.repository_owner }}/docsgpt-fe:develop-${{ matrix.suffix }} + provenance: false + sbom: false cache-from: type=registry,ref=${{ secrets.DOCKER_USERNAME }}/docsgpt-fe:develop cache-to: type=inline + + manifest: + if: github.repository == 'arc53/DocsGPT' + needs: build + runs-on: ubuntu-latest + permissions: + packages: write + steps: + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + with: + driver: docker-container + install: true + + - name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Login to ghcr.io + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Create and push manifest for DockerHub + run: | + docker manifest create ${{ secrets.DOCKER_USERNAME }}/docsgpt-fe:develop \ + --amend ${{ secrets.DOCKER_USERNAME }}/docsgpt-fe:develop-amd64 \ + --amend ${{ secrets.DOCKER_USERNAME }}/docsgpt-fe:develop-arm64 + docker manifest push ${{ secrets.DOCKER_USERNAME }}/docsgpt-fe:develop + + - name: Create and push manifest for ghcr.io + run: | + docker manifest create ghcr.io/${{ github.repository_owner }}/docsgpt-fe:develop \ + --amend ghcr.io/${{ github.repository_owner }}/docsgpt-fe:develop-amd64 \ + --amend ghcr.io/${{ github.repository_owner }}/docsgpt-fe:develop-arm64 + docker manifest push ghcr.io/${{ github.repository_owner }}/docsgpt-fe:develop \ No newline at end of file diff --git a/docs/theme.config.jsx b/docs/theme.config.jsx index 777a0ed5..77d8b9c1 100644 --- a/docs/theme.config.jsx +++ b/docs/theme.config.jsx @@ -49,7 +49,22 @@ const config = { light: 212, }, footer: { - text: `MIT ${new Date().getFullYear()} © DocsGPT`, + text: ( +
+ MIT {new Date().getFullYear()} © + + DocsGPT + + {' | '} + + GitHub + + {' | '} + + Blog + +
+ ), }, editLink: { content: 'Edit this page on GitHub',