From 54728c74e6d30286b74a6c227b0fb1c226edb021 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Sun, 15 Feb 2026 15:47:04 +0000 Subject: [PATCH] fix: Restrict scheduled workflows to upstream repository (#6948) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: CommanderStorm <26258709+CommanderStorm@users.noreply.github.com> --- .github/workflows/codeql-analysis.yml | 4 ++++ .github/workflows/release-nightly.yml | 2 ++ .github/workflows/stale-bot.yml | 2 ++ 3 files changed, 8 insertions(+) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 04d2411f..c52f7abb 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -10,6 +10,8 @@ on: jobs: analyze: + # Only run scheduled analysis on the original repository, not on forks + if: github.event_name != 'schedule' || github.repository == 'louislam/uptime-kuma' name: Analyze runs-on: ubuntu-latest timeout-minutes: 360 @@ -42,6 +44,8 @@ jobs: with: category: "/language:${{matrix.language}}" zizmor: + # Only run scheduled analysis on the original repository, not on forks + if: github.event_name != 'schedule' || github.repository == 'louislam/uptime-kuma' runs-on: ubuntu-latest permissions: security-events: write diff --git a/.github/workflows/release-nightly.yml b/.github/workflows/release-nightly.yml index 7aff7785..0710da60 100644 --- a/.github/workflows/release-nightly.yml +++ b/.github/workflows/release-nightly.yml @@ -10,6 +10,8 @@ permissions: {} jobs: release-nightly: + # Only run on the original repository, not on forks + if: github.repository == 'louislam/uptime-kuma' runs-on: ubuntu-latest timeout-minutes: 120 permissions: diff --git a/.github/workflows/stale-bot.yml b/.github/workflows/stale-bot.yml index 283e4f4a..cb95bf07 100644 --- a/.github/workflows/stale-bot.yml +++ b/.github/workflows/stale-bot.yml @@ -8,6 +8,8 @@ permissions: {} jobs: stale: + # Only run on the original repository, not on forks + if: github.repository == 'louislam/uptime-kuma' runs-on: ubuntu-latest permissions: actions: write