[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:
@@ -23,6 +23,7 @@ permissions: write-all
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Git Repository
|
- name: Checkout Git Repository
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish:
|
publish:
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Git Repository
|
- name: Checkout Git Repository
|
||||||
|
|||||||
Reference in New Issue
Block a user