Browse Source

Ignore CI on draft PRs

Signed-off-by: Henrik Storch <henrik.storch@nextcloud.com>
Henrik Storch 2 years ago
parent
commit
a4dd2b1641
2 changed files with 10 additions and 6 deletions
  1. 6 4
      .github/workflows/lint.yml
  2. 4 2
      .github/workflows/xcode.yml

+ 6 - 4
.github/workflows/lint.yml

@@ -9,16 +9,18 @@ on:
       - master
       - develop
   pull_request:
+    types: [synchronize, opened, reopened, ready_for_review]
     branches:
       - master
-      - develop  
+      - develop
 
 jobs:
   Lint:
     runs-on: ubuntu-latest
-    
+    if: github.event.pull_request.draft == false
+
     steps:
      - uses: actions/checkout@v2
-       
+
      - name: GitHub Action for SwiftLint
-       uses: norio-nomura/action-swiftlint@3.1.0
+       uses: norio-nomura/action-swiftlint@3.1.0

+ 4 - 2
.github/workflows/xcode.yml

@@ -1,11 +1,12 @@
 name: Build
 
-on: 
+on:
   push:
-    branches: 
+    branches:
       - master
       - develop
   pull_request:
+    types: [synchronize, opened, reopened, ready_for_review]
     branches: 
       - master
       - develop
@@ -13,6 +14,7 @@ on:
 jobs:
   XCBuild:
     runs-on: macOS-11
+    if: github.event.pull_request.draft == false
     env:
       PROJECT: Nextcloud.xcodeproj
       DESTINATION: platform=iOS Simulator,name=iPhone 11