AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.
HTML ai-agentcloudflarecloudflare-d1cloudflare-r2cloudflare-workersdockerelectronevernoteevernote-alternativeknowledge-basemcpnote-takingobsidian-alternativeoffline-firstpersonal-knowledge-basepwaself-hostedsqlitetiptapweb-clipper
Guard upstream-only workflows in forks
tianma-if0b918fb3af17
diff --git a/.github/workflows/deploy-tools.yml b/.github/workflows/deploy-tools.ymlindex 166e35d9..1da9089d 100644--- a/.github/workflows/deploy-tools.yml+++ b/.github/workflows/deploy-tools.yml@@ -10,13 +10,12 @@ on:- "scripts/wrangler-runner.mjs"- "scripts/verify-deployment.mjs"- ".dev.vars.example"- - ".github/workflows/sync-edgeever-upstream.yml"+ - ".github/workflows/**"- "tests/deployment-entrypoints.test.ts"- "tests/wrangler-runner.test.ts"- "tests/deployment-verify.test.ts"- "package.json"- "bun.lock"- - ".github/workflows/deploy-tools.yml"push:branches:- main@@ -28,19 +27,19 @@ on:- "scripts/wrangler-runner.mjs"- "scripts/verify-deployment.mjs"- ".dev.vars.example"- - ".github/workflows/sync-edgeever-upstream.yml"+ - ".github/workflows/**"- "tests/deployment-entrypoints.test.ts"- "tests/wrangler-runner.test.ts"- "tests/deployment-verify.test.ts"- "package.json"- "bun.lock"- - ".github/workflows/deploy-tools.yml"permissions:contents: readjobs:wrangler:+ if: github.repository == 'tianma-if/edgeever'name: Wrangler runner (${{ matrix.os }})runs-on: ${{ matrix.os }}strategy:diff --git a/.github/workflows/desktop-build.yml b/.github/workflows/desktop-build.ymlindex 3f9ab1d0..b974ce08 100644--- a/.github/workflows/desktop-build.yml+++ b/.github/workflows/desktop-build.yml@@ -317,6 +317,7 @@ jobs:if: >-${{always() &&+ github.repository == 'tianma-if/edgeever' &&needs.desktop.result == 'success' &&((github.event_name == 'workflow_dispatch' && inputs.release_tag == '') ||diff --git a/.github/workflows/extension-build.yml b/.github/workflows/extension-build.ymlindex ee7c4b6f..2ad59c1a 100644--- a/.github/workflows/extension-build.yml+++ b/.github/workflows/extension-build.yml@@ -22,6 +22,7 @@ permissions:jobs:build:+ if: github.repository == 'tianma-if/edgeever'name: Build Chromium and Firefoxruns-on: ubuntu-latesttimeout-minutes: 10diff --git a/.github/workflows/ios-build.yml b/.github/workflows/ios-build.ymlindex 3dfb1a09..bc396269 100644--- a/.github/workflows/ios-build.yml+++ b/.github/workflows/ios-build.yml@@ -19,6 +19,7 @@ concurrency:jobs:build-and-test:+ if: github.repository == 'tianma-if/edgeever'name: Xcode build + unit testsruns-on: macos-15timeout-minutes: 45diff --git a/.github/workflows/store-delivery.yml b/.github/workflows/store-delivery.ymlindex d301a64f..f39cd552 100644--- a/.github/workflows/store-delivery.yml+++ b/.github/workflows/store-delivery.yml@@ -102,7 +102,11 @@ jobs:android:needs: plan- if: inputs.platform == 'android' || inputs.platform == 'both'+ if: >-+ ${{+ github.repository == 'tianma-if/edgeever' &&+ (inputs.platform == 'android' || inputs.platform == 'both')+ }}name: Deliver Google Playruns-on: [self-hosted, macOS, ARM64, edgeever-mobile]timeout-minutes: 60@@ -176,7 +180,11 @@ jobs:ios:needs: plan- if: inputs.platform == 'ios' || inputs.platform == 'both'+ if: >-+ ${{+ github.repository == 'tianma-if/edgeever' &&+ (inputs.platform == 'ios' || inputs.platform == 'both')+ }}name: Deliver App Store Connectruns-on: ubuntu-latesttimeout-minutes: 90diff --git a/tests/deployment-entrypoints.test.ts b/tests/deployment-entrypoints.test.tsindex f14883bd..4c217fe8 100644--- a/tests/deployment-entrypoints.test.ts+++ b/tests/deployment-entrypoints.test.ts@@ -3,6 +3,7 @@ import { spawnSync } from "node:child_process";import {mkdirSync,mkdtempSync,+ readdirSync,readFileSync,rmSync,writeFileSync,@@ -210,6 +211,26 @@ describe("Cloudflare deployment entrypoints", () => {expect(workflow).toContain("Prefer this workflow over GitHub **Sync fork**");});+ test("forks skip every workflow job except upstream updates", () => {+ const workflowsDirectory = resolve(repositoryRoot, ".github/workflows");+ const workflowFiles = readdirSync(workflowsDirectory)+ .filter((file) => /\.ya?ml$/.test(file))+ .filter((file) => file !== "sync-edgeever-upstream.yml");++ for (const file of workflowFiles) {+ const workflow = readRepositoryFile(`.github/workflows/${file}`);+ const jobs = workflow.slice(workflow.indexOf("\njobs:\n") + "\njobs:\n".length);+ const jobStarts = [...jobs.matchAll(/^ ([A-Za-z0-9_-]+):\s*$/gm)];++ expect(jobStarts.length).toBeGreaterThan(0);+ for (const [index, match] of jobStarts.entries()) {+ const nextJob = jobStarts[index + 1];+ const job = jobs.slice(match.index, nextJob?.index);+ expect(job).toContain("github.repository == 'tianma-if/edgeever'");+ }+ }+ });+test("keeps a forced-redeploy commit on the deploy-mirror update path", () => {expect(decideUpstreamSync({