Skip to content

Commit 4fbaa67

Browse files
authored
chore: replace upstream CI with fork-specific workflows (#2)
1 parent d09d855 commit 4fbaa67

File tree

4 files changed

+52
-111
lines changed

4 files changed

+52
-111
lines changed

.github/workflows/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# CI/CD Workflows
2+
3+
This is a fork of [mem9-ai/mem9](https://github.com/mem9-ai/mem9). Upstream CI workflows (`deploy-dev.yml`, `sync-claude-plugin.yml`) have been removed as they depend on upstream-specific secrets and infrastructure.
4+
5+
## Workflows
6+
7+
| Workflow | Trigger | Description |
8+
|---|---|---|
9+
| `sync-fork.yml` | Daily (UTC 08:00) / Manual | Syncs `main` branch with upstream via GitHub merge-upstream API. Automatically triggers `build-swr` when new commits are synced. |
10+
| `build-swr.yml` | Manual / Auto (via sync-fork) | Builds `mnemo-server` Docker image using `make docker` and pushes to Huawei Cloud SWR with `SHORT_SHA` and `latest` tags. |
11+
12+
## Required Secrets
13+
14+
| Secret | Description |
15+
|---|---|
16+
| `SWR_REGISTRY` | SWR endpoint, e.g. `swr.cn-north-4.myhuaweicloud.com` |
17+
| `SWR_ORGANIZATION` | SWR organization / namespace |
18+
| `SWR_USERNAME` | SWR login username (typically `region@AK`) |
19+
| `SWR_PASSWORD` | SWR login password or temporary token |

.github/workflows/deploy-dev.yml

Lines changed: 0 additions & 78 deletions
This file was deleted.

.github/workflows/sync-claude-plugin.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

.github/workflows/sync-fork.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Sync fork with upstream
2+
3+
on:
4+
schedule:
5+
- cron: "0 8 * * *"
6+
workflow_dispatch:
7+
8+
jobs:
9+
sync:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
steps:
14+
- name: Sync fork
15+
uses: actions/github-script@v7
16+
with:
17+
script: |
18+
const result = await github.rest.repos.mergeUpstream({
19+
owner: context.repo.owner,
20+
repo: context.repo.repo,
21+
branch: 'main',
22+
});
23+
const mergeType = result.data.merge_type ?? 'none';
24+
console.log(`Sync result: ${mergeType}`);
25+
if (mergeType !== 'none') {
26+
console.log('New commits synced, triggering build-swr workflow');
27+
await github.rest.actions.createWorkflowDispatch({
28+
owner: context.repo.owner,
29+
repo: context.repo.repo,
30+
workflow_id: 'build-swr.yml',
31+
ref: 'main',
32+
});
33+
}

0 commit comments

Comments
 (0)