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:
49
.github/workflows/release.yml
vendored
49
.github/workflows/release.yml
vendored
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -1,3 +0,0 @@
|
||||
[submodule "apps/server/src/ee"]
|
||||
path = apps/server/src/ee
|
||||
url = https://github.com/docmost/ee
|
||||
@@ -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
|
||||
|
||||
|
||||
Submodule apps/server/src/ee deleted from e7320a5a0f
29
gitmost.code-workspace
Normal file
29
gitmost.code-workspace
Normal 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"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user