From 4f05fb5d2ee5a0e23cce4797bf185a264bcb9d72 Mon Sep 17 00:00:00 2001 From: vvzvlad Date: Tue, 16 Jun 2026 21:15:42 +0300 Subject: [PATCH] chore(fork): drop private ee submodule and retarget CI to GHCR MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove the private apps/server/src/ee git submodule (github.com/docmost/ee) and the now-empty .gitmodules so that `git clone --recurse-submodules` and CI checkout no longer fail with 404. The server loads EE only via guarded runtime require(), so the build succeeds without it (community edition). Rewrite .github/workflows/release.yml for the fork: - drop the GitHub App token step and `submodules: recursive` checkout - publish to GHCR (ghcr.io/vvzvlad/gitmost) via the built-in GITHUB_TOKEN instead of Docker Hub (docmost/docmost) — no extra secrets required - add `packages: write` permission and an IMAGE env var - log in as github.repository_owner; rename release tarballs to gitmost-* Repoint the Dockerfile image source label to the fork. --- .github/workflows/release.yml | 51 +++++++++++++++-------------------- .gitmodules | 3 --- Dockerfile | 2 +- apps/server/src/ee | 1 - gitmost.code-workspace | 29 ++++++++++++++++++++ 5 files changed, 52 insertions(+), 34 deletions(-) delete mode 100644 .gitmodules delete mode 160000 apps/server/src/ee create mode 100644 gitmost.code-workspace diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f189893d..ae6699a5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,9 +12,11 @@ on: permissions: contents: write + packages: write env: VERSION: ${{ inputs.version || github.ref_name }} + IMAGE: ghcr.io/vvzvlad/gitmost jobs: build: @@ -29,28 +31,18 @@ jobs: suffix: arm64 runs-on: ${{ matrix.runner }} steps: - - name: Generate token - id: app-token - uses: actions/create-github-app-token@v1 - with: - app-id: ${{ secrets.BUILD_APP_ID }} - private-key: ${{ secrets.BUILD_APP_PRIVATE_KEY }} - owner: ${{ github.repository_owner }} - - - name: Checkout with submodules + - name: Checkout uses: actions/checkout@v4 - with: - submodules: recursive - token: ${{ steps.app-token.outputs.token }} - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Login to Docker Hub + - name: Login to GitHub Container Registry uses: docker/login-action@v3 with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push by digest id: build @@ -58,7 +50,7 @@ jobs: with: context: . platforms: ${{ matrix.platform }} - outputs: type=image,name=docmost/docmost,push-by-digest=true,name-canonical=true,push=true + outputs: type=image,name=${{ env.IMAGE }},push-by-digest=true,name-canonical=true,push=true cache-from: type=gha,scope=${{ matrix.suffix }} cache-to: type=gha,scope=${{ matrix.suffix }},mode=max @@ -78,7 +70,7 @@ jobs: - name: Strip v prefix id: strip-v run: echo "version=${VERSION#v}" >> "$GITHUB_OUTPUT" - + - name: Export Docker image uses: docker/build-push-action@v6 with: @@ -86,19 +78,19 @@ jobs: platforms: ${{ matrix.platform }} push: false tags: | - docmost/docmost:latest - docmost/docmost:${{ steps.strip-v.outputs.version }} - outputs: type=docker,dest=docmost-${{ matrix.suffix }}.docker.tar + ${{ env.IMAGE }}:latest + ${{ env.IMAGE }}:${{ steps.strip-v.outputs.version }} + outputs: type=docker,dest=gitmost-${{ matrix.suffix }}.docker.tar cache-from: type=gha,scope=${{ matrix.suffix }} - name: Compress image - run: gzip docmost-${{ matrix.suffix }}.docker.tar + run: gzip gitmost-${{ matrix.suffix }}.docker.tar - name: Upload image archive uses: actions/upload-artifact@v4 with: name: docker-image-${{ matrix.suffix }} - path: docmost-${{ matrix.suffix }}.docker.tar.gz + path: gitmost-${{ matrix.suffix }}.docker.tar.gz if-no-files-found: error release: @@ -115,17 +107,18 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Login to Docker Hub + - name: Login to GitHub Container Registry uses: docker/login-action@v3 with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Extract metadata for tags id: meta uses: docker/metadata-action@v5 with: - images: docmost/docmost + images: ${{ env.IMAGE }} tags: | type=semver,pattern={{version}},value=${{ env.VERSION }} type=semver,pattern={{major}}.{{minor}},value=${{ env.VERSION }},enable=${{ !contains(env.VERSION, '-') }} @@ -135,7 +128,7 @@ jobs: working-directory: /tmp/digests run: | docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ - $(printf 'docmost/docmost@sha256:%s ' *) + $(printf '${{ env.IMAGE }}@sha256:%s ' *) - name: Download image archives uses: actions/download-artifact@v4 @@ -149,6 +142,6 @@ jobs: with: tag_name: ${{ env.VERSION }} files: | - /tmp/images/docmost-amd64.docker.tar.gz - /tmp/images/docmost-arm64.docker.tar.gz + /tmp/images/gitmost-amd64.docker.tar.gz + /tmp/images/gitmost-arm64.docker.tar.gz draft: true diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 2bdf0e03..00000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "apps/server/src/ee"] - path = apps/server/src/ee - url = https://github.com/docmost/ee diff --git a/Dockerfile b/Dockerfile index d665e254..2e608066 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ FROM node:22-slim AS base -LABEL org.opencontainers.image.source="https://github.com/docmost/docmost" +LABEL org.opencontainers.image.source="https://github.com/vvzvlad/gitmost" RUN npm install -g pnpm@10.4.0 diff --git a/apps/server/src/ee b/apps/server/src/ee deleted file mode 160000 index e7320a5a..00000000 --- a/apps/server/src/ee +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e7320a5a0fa8296a737b5118db395aec80ffb25a diff --git a/gitmost.code-workspace b/gitmost.code-workspace new file mode 100644 index 00000000..93ff5829 --- /dev/null +++ b/gitmost.code-workspace @@ -0,0 +1,29 @@ +{ + "folders": [ + { + "path": "." + } + ], + "settings": { + "workbench.colorCustomizations": { + "activityBar.activeBackground": "#ddc96a", + "activityBar.background": "#ddc96a", + "activityBar.foreground": "#15202b", + "activityBar.inactiveForeground": "#15202b99", + "activityBarBadge.background": "#249c87", + "activityBarBadge.foreground": "#e7e7e7", + "commandCenter.border": "#15202b99", + "sash.hoverBorder": "#ddc96a", + "titleBar.activeBackground": "#d3ba41", + "titleBar.activeForeground": "#15202b", + "titleBar.inactiveBackground": "#d3ba4199", + "titleBar.inactiveForeground": "#15202b99", + "statusBar.background": "#d3ba41", + "statusBar.foreground": "#15202b", + "statusBarItem.hoverBackground": "#b79f2a", + "statusBarItem.remoteBackground": "#d3ba41", + "statusBarItem.remoteForeground": "#15202b" + }, + "peacock.color": "#d3ba41" + } +} \ No newline at end of file