Skip to content

Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.

ci: skip PR workflows for draft pull requests

白熱b53aef0c4015
diff --git a/.github/workflows/build-packages.yml b/.github/workflows/build-packages.yml
index f7429bfb19..35aab9feb7 100644
--- a/.github/workflows/build-packages.yml
+++ b/.github/workflows/build-packages.yml
@@ -7,6 +7,11 @@ on:
pull_request:
branches:
- dev
+ types:
+ - opened
+ - synchronize
+ - reopened
+ - ready_for_review
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
@@ -20,7 +25,7 @@ env:
jobs:
build:
- if: github.repository == 'dream-num/univer'
+ if: github.repository == 'dream-num/univer' && (github.event_name != 'pull_request' || !github.event.pull_request.draft)
runs-on: ubuntu-latest
env:
diff --git a/.github/workflows/ci-quality-checks.yml b/.github/workflows/ci-quality-checks.yml
index f6b35a1f94..36d912c93f 100644
--- a/.github/workflows/ci-quality-checks.yml
+++ b/.github/workflows/ci-quality-checks.yml
@@ -7,6 +7,11 @@ on:
pull_request:
branches:
- dev
+ types:
+ - opened
+ - synchronize
+ - reopened
+ - ready_for_review
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
@@ -21,7 +26,7 @@ env:
jobs:
test:
- if: github.repository == 'dream-num/univer'
+ if: github.repository == 'dream-num/univer' && (github.event_name != 'pull_request' || !github.event.pull_request.draft)
runs-on: ubuntu-latest
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
@@ -45,7 +50,7 @@ jobs:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
eslint:
- if: github.repository == 'dream-num/univer'
+ if: github.repository == 'dream-num/univer' && (github.event_name != 'pull_request' || !github.event.pull_request.draft)
runs-on: ubuntu-latest
steps:
@@ -69,7 +74,7 @@ jobs:
run: pnpm lint --quiet --cache --cache-location .eslintcache
typecheck:
- if: github.repository == 'dream-num/univer'
+ if: github.repository == 'dream-num/univer' && (github.event_name != 'pull_request' || !github.event.pull_request.draft)
runs-on: ubuntu-latest
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
diff --git a/.github/workflows/collect-pr-metadata.yml b/.github/workflows/collect-pr-metadata.yml
index a60fa849b5..d5b6c6f2fc 100644
--- a/.github/workflows/collect-pr-metadata.yml
+++ b/.github/workflows/collect-pr-metadata.yml
@@ -2,8 +2,14 @@ name: 🎬 Setup
on:
pull_request:
- branches: [dev]
- types: [opened, synchronize, reopened, closed]
+ branches:
+ - dev
+ types:
+ - opened
+ - synchronize
+ - reopened
+ - closed
+ - ready_for_review
permissions:
contents: read
@@ -19,7 +25,7 @@ env:
jobs:
set-pr-info:
name: set PR info
- if: github.repository == 'dream-num/univer'
+ if: github.repository == 'dream-num/univer' && !github.event.pull_request.draft
runs-on: minimum-runner
steps:
- name: Save PR info
diff --git a/.github/workflows/deploy-github-pages.yml b/.github/workflows/deploy-github-pages.yml
index 096a85f7b8..e1d2a53f69 100644
--- a/.github/workflows/deploy-github-pages.yml
+++ b/.github/workflows/deploy-github-pages.yml
@@ -2,7 +2,8 @@ name: 🌐 Deploy to GitHub Pages
on:
push:
- branches: [dev]
+ branches:
+ - dev
tags:
- 'v*.*.*'
- 'v*.*.*-alpha.*'
diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml
index 6379146ba3..aa32968dd9 100644
--- a/.github/workflows/e2e.yml
+++ b/.github/workflows/e2e.yml
@@ -4,6 +4,11 @@ on:
pull_request:
branches:
- dev
+ types:
+ - opened
+ - synchronize
+ - reopened
+ - ready_for_review
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
@@ -20,7 +25,7 @@ env:
jobs:
e2e-shard:
name: e2e-test shard (${{ matrix.shard-index }}/${{ matrix.shard-total }})
- if: github.repository == 'dream-num/univer'
+ if: github.repository == 'dream-num/univer' && (github.event_name != 'pull_request' || !github.event.pull_request.draft)
runs-on: ubuntu-latest
strategy:
@@ -83,7 +88,7 @@ jobs:
name: e2e-test
runs-on: ubuntu-latest
needs: e2e-shard
- if: ${{ always() && github.repository == 'dream-num/univer' }}
+ if: ${{ always() && github.repository == 'dream-num/univer' && (github.event_name != 'pull_request' || !github.event.pull_request.draft) }}
steps:
- name: Check shard results
diff --git a/.github/workflows/security-semgrep.yml b/.github/workflows/security-semgrep.yml
index bb001513cb..2b24a1fb57 100644
--- a/.github/workflows/security-semgrep.yml
+++ b/.github/workflows/security-semgrep.yml
@@ -2,9 +2,18 @@ name: 🔐 Semgrep
on:
push:
- branches: [main, dev]
+ branches:
+ - main
+ - dev
pull_request:
- branches: [main, dev]
+ branches:
+ - main
+ - dev
+ types:
+ - opened
+ - synchronize
+ - reopened
+ - ready_for_review
workflow_dispatch:
concurrency:
@@ -18,7 +27,7 @@ permissions:
jobs:
semgrep:
- if: github.repository == 'dream-num/univer'
+ if: github.repository == 'dream-num/univer' && (github.event_name != 'pull_request' || !github.event.pull_request.draft)
runs-on: ubuntu-latest
timeout-minutes: 20
diff --git a/.github/workflows/validate-pr-title.yml b/.github/workflows/validate-pr-title.yml
index 3a4c9d5410..8fe327f170 100644
--- a/.github/workflows/validate-pr-title.yml
+++ b/.github/workflows/validate-pr-title.yml
@@ -6,6 +6,7 @@ on:
- opened
- edited
- synchronize
+ - ready_for_review
permissions:
pull-requests: read
@@ -13,7 +14,7 @@ permissions:
jobs:
validate:
name: validate PR title
- if: github.repository == 'dream-num/univer'
+ if: github.repository == 'dream-num/univer' && !github.event.pull_request.draft
runs-on: minimum-runner
steps: