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>
This commit is contained in:
Copilot
2026-02-15 15:47:04 +00:00
committed by GitHub
parent bc90af1833
commit 54728c74e6
3 changed files with 8 additions and 0 deletions

View File

@@ -10,6 +10,8 @@ on:
jobs: jobs:
analyze: analyze:
# Only run scheduled analysis on the original repository, not on forks
if: github.event_name != 'schedule' || github.repository == 'louislam/uptime-kuma'
name: Analyze name: Analyze
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 360 timeout-minutes: 360
@@ -42,6 +44,8 @@ jobs:
with: with:
category: "/language:${{matrix.language}}" category: "/language:${{matrix.language}}"
zizmor: 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 runs-on: ubuntu-latest
permissions: permissions:
security-events: write security-events: write

View File

@@ -10,6 +10,8 @@ permissions: {}
jobs: jobs:
release-nightly: release-nightly:
# Only run on the original repository, not on forks
if: github.repository == 'louislam/uptime-kuma'
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 120 timeout-minutes: 120
permissions: permissions:

View File

@@ -8,6 +8,8 @@ permissions: {}
jobs: jobs:
stale: stale:
# Only run on the original repository, not on forks
if: github.repository == 'louislam/uptime-kuma'
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
actions: write actions: write