How do I run github actions only on pr #195762
Replies: 2 comments
-
|
You just need to change the trigger. Replace on:
pull_request:
branches: [main]If you also want to scope it to certain paths: on:
pull_request:
branches: [main]
paths:
- "src/**"
- "package.json"A couple of notes:
|
Beta Was this translation helpful? Give feedback.
-
|
Change your workflow trigger from Before (triggers on every push): on:
push:
branches: [main]After (triggers only on pull requests): on:
pull_request:
branches: [main]This will trigger the workflow whenever a PR is opened, synchronized (new commits pushed to the PR branch), or reopened targeting If you want even more control, you can specify which PR events trigger it: on:
pull_request:
branches: [main]
types: [opened, synchronize, reopened]Common
Note: Inside a Hope that helps! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
🏷️ Discussion Type
Question
💬 Feature/Topic Area
ARC (Actions Runner Controller)
Discussion Details
I hv work flow that runs on every push how do I change it so it only triggers on pr and not direct pushes?
Beta Was this translation helpful? Give feedback.
All reactions