-
Notifications
You must be signed in to change notification settings - Fork 798
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(ci): update CI to run on pull_request event #2943
Conversation
- update CI to run on pull_request event to run on PRs from forked repos
.github/workflows/main.yml
Outdated
on: | ||
push: | ||
branches: | ||
- '**' | ||
pull_request: | ||
branches: | ||
- '**' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Specifying the branches is not necessary in this case:
on: | |
push: | |
branches: | |
- '**' | |
pull_request: | |
branches: | |
- '**' | |
on: | |
push: | |
pull_request: |
Alternatively you can use the shorthand on: [push, pull_request]
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went with the shorthand, that 'felt more readable' to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm but it looks like as-is (I didn't think to check beforehand) these events aren't exclusive. IE right now, there's a pull_request and push set of checks running. Let me see what we can do about that
28ed50c
to
d2a2d2e
Compare
@ltm I updated this to be explicit to run CI on our protected branches, and once on CI. I think that achieves what we effectively want - a clean CI run on the |
- update CI to run on pull_request event to run on PRs from forked repos - explicitly mark `push` events to prevent 2x runs when a PR is opened against a branch in the Stencil repo itself
Pull request checklist
Please check if your PR fulfills the following requirements:
npm run build
) was run locallyand any changes were pushedPull request type
Please check the type of change your PR introduces:
What is the current behavior?
Currently, GitHub Actions don't trigger for PRs created from forked repos, only when a push is made directly to the Stencil repo
What is the new behavior?
update CI to run on pull_request event to run on PRs from forked repos
Does this introduce a breaking change?
Other information