[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.
This commit is contained in:
2026-07-09 18:29:27 +08:00
parent 53ba351ca7
commit ac5e37415a
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -23,6 +23,7 @@ permissions: write-all
jobs:
build:
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Checkout Git Repository
+1
View File
@@ -8,6 +8,7 @@ on:
jobs:
publish:
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Checkout Git Repository