瀏覽代碼

CI: Skip class ref. sync and offline docs on forks

Max Hilbrunner 8 月之前
父節點
當前提交
b40f92eba9
共有 2 個文件被更改,包括 6 次插入0 次删除
  1. 3 0
      .github/workflows/build_offline_docs.yml
  2. 3 0
      .github/workflows/sync_class_ref.yml

+ 3 - 0
.github/workflows/build_offline_docs.yml

@@ -8,6 +8,9 @@ on:
 
 
 jobs:
 jobs:
   build:
   build:
+    # Don't run scheduled runs on forks unless the CI_OFFLINE_DOCS_CRON variable is set to 'true'.
+    # Manual runs can still be triggered as normal.
+    if: ${{ github.repository_owner == 'godotengine' || github.event_name != 'schedule' || vars.CI_OFFLINE_DOCS_CRON == 'true' }}
     runs-on: ubuntu-22.04
     runs-on: ubuntu-22.04
     strategy:
     strategy:
       matrix:
       matrix:

+ 3 - 0
.github/workflows/sync_class_ref.yml

@@ -10,6 +10,9 @@ concurrency:
 
 
 jobs:
 jobs:
   build:
   build:
+    # Don't run scheduled runs on forks unless the CI_SYNC_CLASS_REF_CRON variable is set to 'true'.
+    # Manual runs can still be triggered as normal.
+    if: ${{ github.repository_owner == 'godotengine' || github.event_name != 'schedule' || vars.CI_SYNC_CLASS_REF_CRON == 'true' }}
     name: Update class reference files based on the engine revision
     name: Update class reference files based on the engine revision
     runs-on: ubuntu-latest
     runs-on: ubuntu-latest
     env:
     env: