From 3f641e3bb5d368eee2670b73390870750365fa03 Mon Sep 17 00:00:00 2001 From: "Alex.hxy" <1872591453@qq.com> Date: Thu, 14 Nov 2024 17:50:06 +0800 Subject: [PATCH] chore: ci optimization --- .github/workflows/ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 06ce6464ee..958dcf0e45 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,12 +5,15 @@ on: branches: - next - V3.0 + pull_request: + types: [opened, synchronize, reopened] pull_request_target: types: [opened, synchronize, reopened] workflow_dispatch: jobs: lint: + if: ${{ github.event_name == 'pull_request' }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -30,6 +33,7 @@ jobs: run: npm run lint test: + if: ${{ github.event_name == 'pull_request' }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -55,6 +59,7 @@ jobs: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} build: + if: ${{ github.event_name == 'pull_request' }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -83,6 +88,7 @@ jobs: if: github.ref == 'refs/heads/next' run: npm run build:taro:site add-label: + if: ${{ github.event_name == 'pull_request_target' }} runs-on: ubuntu-latest steps: