chore(fork): drop private ee submodule and retarget CI to GHCR

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.
This commit is contained in:
vvzvlad
2026-06-16 21:15:42 +03:00
parent 6191acfa14
commit 4f05fb5d2e
5 changed files with 52 additions and 34 deletions

View File

@@ -12,9 +12,11 @@ on:
permissions: permissions:
contents: write contents: write
packages: write
env: env:
VERSION: ${{ inputs.version || github.ref_name }} VERSION: ${{ inputs.version || github.ref_name }}
IMAGE: ghcr.io/vvzvlad/gitmost
jobs: jobs:
build: build:
@@ -29,28 +31,18 @@ jobs:
suffix: arm64 suffix: arm64
runs-on: ${{ matrix.runner }} runs-on: ${{ matrix.runner }}
steps: steps:
- name: Generate token - name: Checkout
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
uses: actions/checkout@v4 uses: actions/checkout@v4
with:
submodules: recursive
token: ${{ steps.app-token.outputs.token }}
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub - name: Login to GitHub Container Registry
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
username: ${{ secrets.DOCKERHUB_USERNAME }} registry: ghcr.io
password: ${{ secrets.DOCKERHUB_TOKEN }} username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push by digest - name: Build and push by digest
id: build id: build
@@ -58,7 +50,7 @@ jobs:
with: with:
context: . context: .
platforms: ${{ matrix.platform }} 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-from: type=gha,scope=${{ matrix.suffix }}
cache-to: type=gha,scope=${{ matrix.suffix }},mode=max cache-to: type=gha,scope=${{ matrix.suffix }},mode=max
@@ -86,19 +78,19 @@ jobs:
platforms: ${{ matrix.platform }} platforms: ${{ matrix.platform }}
push: false push: false
tags: | tags: |
docmost/docmost:latest ${{ env.IMAGE }}:latest
docmost/docmost:${{ steps.strip-v.outputs.version }} ${{ env.IMAGE }}:${{ steps.strip-v.outputs.version }}
outputs: type=docker,dest=docmost-${{ matrix.suffix }}.docker.tar outputs: type=docker,dest=gitmost-${{ matrix.suffix }}.docker.tar
cache-from: type=gha,scope=${{ matrix.suffix }} cache-from: type=gha,scope=${{ matrix.suffix }}
- name: Compress image - name: Compress image
run: gzip docmost-${{ matrix.suffix }}.docker.tar run: gzip gitmost-${{ matrix.suffix }}.docker.tar
- name: Upload image archive - name: Upload image archive
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: docker-image-${{ matrix.suffix }} name: docker-image-${{ matrix.suffix }}
path: docmost-${{ matrix.suffix }}.docker.tar.gz path: gitmost-${{ matrix.suffix }}.docker.tar.gz
if-no-files-found: error if-no-files-found: error
release: release:
@@ -115,17 +107,18 @@ jobs:
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub - name: Login to GitHub Container Registry
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
username: ${{ secrets.DOCKERHUB_USERNAME }} registry: ghcr.io
password: ${{ secrets.DOCKERHUB_TOKEN }} username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata for tags - name: Extract metadata for tags
id: meta id: meta
uses: docker/metadata-action@v5 uses: docker/metadata-action@v5
with: with:
images: docmost/docmost images: ${{ env.IMAGE }}
tags: | tags: |
type=semver,pattern={{version}},value=${{ env.VERSION }} type=semver,pattern={{version}},value=${{ env.VERSION }}
type=semver,pattern={{major}}.{{minor}},value=${{ env.VERSION }},enable=${{ !contains(env.VERSION, '-') }} type=semver,pattern={{major}}.{{minor}},value=${{ env.VERSION }},enable=${{ !contains(env.VERSION, '-') }}
@@ -135,7 +128,7 @@ jobs:
working-directory: /tmp/digests working-directory: /tmp/digests
run: | run: |
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ 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 - name: Download image archives
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
@@ -149,6 +142,6 @@ jobs:
with: with:
tag_name: ${{ env.VERSION }} tag_name: ${{ env.VERSION }}
files: | files: |
/tmp/images/docmost-amd64.docker.tar.gz /tmp/images/gitmost-amd64.docker.tar.gz
/tmp/images/docmost-arm64.docker.tar.gz /tmp/images/gitmost-arm64.docker.tar.gz
draft: true draft: true

3
.gitmodules vendored
View File

@@ -1,3 +0,0 @@
[submodule "apps/server/src/ee"]
path = apps/server/src/ee
url = https://github.com/docmost/ee

View File

@@ -1,5 +1,5 @@
FROM node:22-slim AS base 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 RUN npm install -g pnpm@10.4.0

29
gitmost.code-workspace Normal file
View File

@@ -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"
}
}