From ac5e37415ae2d3a1343e394fb013667c844fdc31 Mon Sep 17 00:00:00 2001 From: Bacteriawa Date: Thu, 9 Jul 2026 18:29:27 +0800 Subject: [PATCH] [ci skip]Skip workflows on pull_request events Add job-level condition in build.yml and publish-api.yml to skip running the build and publish jobs when the GitHub event is a pull_request. This ensures these jobs only run for non-PR events (e.g., push, workflow_dispatch) and avoids executing them for pull request events. --- .github/workflows/build.yml | 1 + .github/workflows/publish-api.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ad2e74b..ad58069 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,6 +23,7 @@ permissions: write-all jobs: build: + if: github.event_name != 'pull_request' runs-on: ubuntu-latest steps: - name: Checkout Git Repository diff --git a/.github/workflows/publish-api.yml b/.github/workflows/publish-api.yml index ba59461..150f074 100644 --- a/.github/workflows/publish-api.yml +++ b/.github/workflows/publish-api.yml @@ -8,6 +8,7 @@ on: jobs: publish: + if: github.event_name != 'pull_request' runs-on: ubuntu-latest steps: - name: Checkout Git Repository