Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
ci: guard fork-hostile automation and publish jobs with vars.REPO_MAIN
matt wilkie70ecb343095c
diff --git a/.github/workflows/main-docker.yml b/.github/workflows/main-docker.ymlindex cdf3f3862e..811ac36901 100644--- a/.github/workflows/main-docker.yml+++ b/.github/workflows/main-docker.yml@@ -109,6 +109,9 @@ jobs:build:name: Build Docker images+ # Only the main repository publishes. merge declares needs: build, so it skips with+ # this job; test_docker stays unguarded because it uses no secrets.+ if: ${{ github.repository == vars.REPO_MAIN }}strategy:fail-fast: falsematrix:diff --git a/.github/workflows/sync-readme.yml b/.github/workflows/sync-readme.ymlindex 6fbf2805a1..e3ccda3e34 100644--- a/.github/workflows/sync-readme.yml+++ b/.github/workflows/sync-readme.yml@@ -32,6 +32,9 @@ permissions:jobs:sync-readme:name: Regenerate the translation base README+ # Only the repository Weblate translates from needs the regenerated base, and a fork+ # replays the README push when it syncs main.+ if: ${{ github.repository == vars.REPO_MAIN }}runs-on: ubuntu-latestpermissions:contents: writediff --git a/.github/workflows/update-model-prices.yml b/.github/workflows/update-model-prices.ymlindex 2765b55107..7dae177515 100644--- a/.github/workflows/update-model-prices.yml+++ b/.github/workflows/update-model-prices.yml@@ -15,6 +15,9 @@ permissions:jobs:update-model-prices:name: Refresh model_prices.json+ # Forks inherit the schedule, and the PR this opens is only useful in the repository+ # model_prices.json ships from.+ if: ${{ github.repository == vars.REPO_MAIN }}runs-on: ubuntu-latestpermissions:contents: writediff --git a/.github/workflows/update-nix-flake.yml b/.github/workflows/update-nix-flake.ymlindex 76754b174f..ef50043f77 100644--- a/.github/workflows/update-nix-flake.yml+++ b/.github/workflows/update-nix-flake.yml@@ -33,6 +33,9 @@ permissions:jobs:electron-pin:name: Sync the pinned Electron binary+ # A fork replays the package.json bump when it syncs main, so without the guard it+ # opens the flake PR against a pin it does not own.+ if: ${{ github.repository == vars.REPO_MAIN }}runs-on: ubuntu-latestpermissions:contents: writediff --git a/.github/workflows/update-pdfjs-viewer.yml b/.github/workflows/update-pdfjs-viewer.ymlindex eca30914a5..caa23b613e 100644--- a/.github/workflows/update-pdfjs-viewer.yml+++ b/.github/workflows/update-pdfjs-viewer.yml@@ -30,6 +30,9 @@ permissions:jobs:vendor-viewer:+ # Forks inherit the schedule, and the bump PR is only useful in the repository+ # pdfjs-dist is pinned from.+ if: ${{ github.repository == vars.REPO_MAIN }}# Matched to the e2e-pdfjs-viewer job in playwright.yml, which runs the same suite.runs-on: ubuntu-22.04name: Bump pdf.js and re-vendor the viewer