From 5ed9913b528bbd5e6ef829bd2964bbc6810b0511 Mon Sep 17 00:00:00 2001 From: Diogo Esteves Date: Wed, 28 Oct 2026 14:41:31 +0000 Subject: [PATCH] Document how to skip runs on forks --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 18784fbc..86ab4f07 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,17 @@ If using [trusted publishing](https://docs.npmjs.com/trusted-publishers), it's r > > Setting the `GITHUB_TOKEN` environment variable does not configure the action. This applies whether release changes are pushed using the GitHub API or the Git CLI. +> [!TIP] +> If a fork of your repository has GitHub Actions enabled, the workflow also runs in the fork when its base branch is updated, and can open version pull requests there. Your repository secrets aren't available in forks either, so publishing from them would fail. To skip runs on forks, check the repository name in the job's `if` condition: +> +> ```yaml +> jobs: +> publish: +> if: github.repository == 'owner/repo' +> ``` +> +> When using the sub-actions, add the condition to the `select-mode` job so the jobs that depend on it are skipped too. + ### API