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.
TypeScript boardcollaborationdocdocxexceloffce365officepdfpptpptxpresentationsdksheetslidesspreadsheetuniverwordwordprocessorworkspacexlsx
ci: update runner types and permissions in workflow files (#7148)
白熱0dc521b81b28
diff --git a/.github/workflows/ci-quality-checks.yml b/.github/workflows/ci-quality-checks.ymlindex 303549b6e4..f6b35a1f94 100644--- a/.github/workflows/ci-quality-checks.yml+++ b/.github/workflows/ci-quality-checks.yml@@ -21,6 +21,7 @@ env:jobs:test:+ if: github.repository == 'dream-num/univer'runs-on: ubuntu-latestenv:TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}@@ -44,6 +45,7 @@ jobs:CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}eslint:+ if: github.repository == 'dream-num/univer'runs-on: ubuntu-lateststeps:@@ -67,6 +69,7 @@ jobs:run: pnpm lint --quiet --cache --cache-location .eslintcachetypecheck:+ if: github.repository == 'dream-num/univer'runs-on: ubuntu-latestenv:TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}diff --git a/.github/workflows/collect-pr-metadata.yml b/.github/workflows/collect-pr-metadata.ymlindex 3d6cfcf58e..a60fa849b5 100644--- a/.github/workflows/collect-pr-metadata.yml+++ b/.github/workflows/collect-pr-metadata.yml@@ -6,17 +6,21 @@ on:types: [opened, synchronize, reopened, closed]permissions:- actions: write+ contents: readpull-requests: readconcurrency:group: ${{ github.workflow }}-${{ github.ref }}cancel-in-progress: true+env:+ TURBO_TELEMETRY_DISABLED: '1'+jobs:set-pr-info:name: set PR info- runs-on: ubuntu-latest+ if: github.repository == 'dream-num/univer'+ runs-on: minimum-runnersteps:- name: Save PR infoenv:diff --git a/.github/workflows/deploy-github-pages.yml b/.github/workflows/deploy-github-pages.ymlindex f1882fa6b5..096a85f7b8 100644--- a/.github/workflows/deploy-github-pages.yml+++ b/.github/workflows/deploy-github-pages.yml@@ -19,6 +19,7 @@ permissions:jobs:deploy:+ if: github.repository == 'dream-num/univer'runs-on: ubuntu-lateststeps:diff --git a/.github/workflows/deploy-pr-preview.yml b/.github/workflows/deploy-pr-preview.ymlindex c754131a8e..8ff34c99b2 100644--- a/.github/workflows/deploy-pr-preview.yml+++ b/.github/workflows/deploy-pr-preview.yml@@ -21,7 +21,7 @@ env:jobs:setup:- if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_repository.full_name == github.repository }}+ if: ${{ github.repository == 'dream-num/univer' && github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_repository.full_name == github.repository }}runs-on: ubuntu-latestoutputs:@@ -82,7 +82,7 @@ jobs:prepare:runs-on: ubuntu-latestneeds: [setup]- if: ${{ needs.setup.outputs.id != '' && needs.setup.outputs.state != 'closed' }}+ if: ${{ github.repository == 'dream-num/univer' && needs.setup.outputs.id != '' && needs.setup.outputs.state != 'closed' }}steps:# ================= Create Comment =================@@ -116,7 +116,7 @@ jobs:build-and-deploy:runs-on: ubuntu-latestneeds: [setup]- if: ${{ needs.setup.outputs.id != '' }}+ if: ${{ github.repository == 'dream-num/univer' && needs.setup.outputs.id != '' }}steps:- name: Checkout@@ -189,32 +189,3 @@ jobs:pr-number: ${{ needs.setup.outputs.id }}comment: falseaction: ${{ needs.setup.outputs.state == 'closed' && 'remove' || 'deploy' }}-- notify:- runs-on: ubuntu-latest- needs: [setup, build-and-deploy]- if: ${{ needs.setup.outputs.id != '' && needs.setup.outputs.state != 'closed' }}-- steps:- # ================= Create Comment =================- - name: 🧽 Find And Delete Comment- uses: peter-evans/find-comment@v4- if: ${{ needs.setup.outputs.id != '' }}- id: fc- with:- issue-number: ${{ needs.setup.outputs.id }}- comment-author: 'github-actions[bot]'- body-includes: View Deployment-- - name: 📝 Create or update comment- uses: peter-evans/create-or-update-comment@v5- if: ${{ needs.setup.outputs.id != '' }}- with:- comment-id: ${{ steps.fc.outputs.comment-id }}- issue-number: ${{ needs.setup.outputs.id }}- body: |- ## View Deployment- | 📑 Demo (React@19) | Demo (React@16) | 📚 Storybook |- | --- | --- | --- |- | [🔗 Preview link](https://dream-num.github.io/univer/pr-preview/pr-${{ needs.setup.outputs.id }}/) | [🔗 Preview link](https://dream-num.github.io/univer/pr-preview/pr-${{ needs.setup.outputs.id }}/react16/) | [🔗 Preview link](https://dream-num.github.io/univer/pr-preview/pr-${{ needs.setup.outputs.id }}/storybook/) |- edit-mode: replacediff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.ymlindex f19925c131..6379146ba3 100644--- a/.github/workflows/e2e.yml+++ b/.github/workflows/e2e.yml@@ -20,6 +20,7 @@ env:jobs:e2e-shard:name: e2e-test shard (${{ matrix.shard-index }}/${{ matrix.shard-total }})+ if: github.repository == 'dream-num/univer'runs-on: ubuntu-lateststrategy:@@ -82,7 +83,7 @@ jobs:name: e2e-testruns-on: ubuntu-latestneeds: e2e-shard- if: ${{ always() }}+ if: ${{ always() && github.repository == 'dream-num/univer' }}steps:- name: Check shard resultsdiff --git a/.github/workflows/release-npm.yml b/.github/workflows/release-npm.ymlindex 7733b3c9ea..7678931b26 100644--- a/.github/workflows/release-npm.yml+++ b/.github/workflows/release-npm.yml@@ -20,20 +20,13 @@ env:jobs:prepare:+ if: github.repository == 'dream-num/univer'runs-on: ubuntu-latestoutputs:release_type: ${{ steps.release-type.outputs.value }}steps:- - name: Checkout- uses: actions/checkout@v7- with:- persist-credentials: false-- - name: Setup Node.js- uses: ./.github/actions/setup-node-- name: 🚚 Get release typeid: release-typeenv:diff --git a/.github/workflows/security-semgrep.yml b/.github/workflows/security-semgrep.ymlindex 32c07bc286..bb001513cb 100644--- a/.github/workflows/security-semgrep.yml+++ b/.github/workflows/security-semgrep.yml@@ -18,6 +18,7 @@ permissions:jobs:semgrep:+ if: github.repository == 'dream-num/univer'runs-on: ubuntu-latesttimeout-minutes: 20diff --git a/.github/workflows/sync-gitee-mirror.yml b/.github/workflows/sync-gitee-mirror.ymlindex 4056a1c127..a7fe194063 100644--- a/.github/workflows/sync-gitee-mirror.yml+++ b/.github/workflows/sync-gitee-mirror.yml@@ -9,10 +9,10 @@ on:jobs:sync:if: github.repository == 'dream-num/univer'- runs-on: ubuntu-latest+ runs-on: minimum-runnersteps:- name: Sync Gitee- uses: jikkai/sync-gitee@main+ uses: jikkai/sync-gitee@v1with:repository: dream-num/univerusername: ${{ secrets.GITEE_USERNAME }}diff --git a/.github/workflows/update-playwright-snapshots.yml b/.github/workflows/update-playwright-snapshots.ymlindex 929e76cdcf..10dea9e92f 100644--- a/.github/workflows/update-playwright-snapshots.yml+++ b/.github/workflows/update-playwright-snapshots.yml@@ -9,6 +9,7 @@ permissions:jobs:update-snapshots:+ if: github.repository == 'dream-num/univer'runs-on: ubuntu-latestenv:GH_TOKEN: ${{ github.token }}diff --git a/.github/workflows/validate-pr-title.yml b/.github/workflows/validate-pr-title.ymlindex 0aaa61def5..3a4c9d5410 100644--- a/.github/workflows/validate-pr-title.yml+++ b/.github/workflows/validate-pr-title.yml@@ -13,7 +13,8 @@ permissions:jobs:validate:name: validate PR title- runs-on: ubuntu-latest+ if: github.repository == 'dream-num/univer'+ runs-on: minimum-runnersteps:- uses: amannn/action-semantic-pull-request@v6