瀏覽代碼

Don't run CI twice (on push AND pull request) (#2049)

Florian Albrechtskirchinger 10 月之前
父節點
當前提交
dd20342825
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      .github/workflows/test.yaml

+ 3 - 0
.github/workflows/test.yaml

@@ -5,6 +5,7 @@ on: [push, pull_request]
 jobs:
   ubuntu:
     runs-on: ubuntu-latest
+    if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
     steps:
       - name: checkout
         uses: actions/checkout@v4
@@ -17,6 +18,7 @@ jobs:
 
   macos:
     runs-on: macos-latest
+    if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
     steps:
       - name: checkout
         uses: actions/checkout@v4
@@ -27,6 +29,7 @@ jobs:
 
   windows:
     runs-on: windows-latest
+    if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
     steps:
     - name: Prepare Git for Checkout on Windows
       run: |