-
Notifications
You must be signed in to change notification settings - Fork 196
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
ci: use pull_request closed event for selective vrt runs #3254
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -4,8 +4,15 @@ on: | |||||
push: | ||||||
branches: | ||||||
- main | ||||||
- "!changeset-release/**" | ||||||
- "!dependabot/**" | ||||||
pull_request: | ||||||
# the closed event type gives us the head_ref (the name of the branch being merged into main) | ||||||
types: | ||||||
- closed | ||||||
# for PRs merging into the below branches | ||||||
branches: | ||||||
- main | ||||||
- spectrum_two | ||||||
- s2-foundations-redux | ||||||
workflow_dispatch: | ||||||
workflow_call: | ||||||
inputs: | ||||||
|
@@ -25,7 +32,8 @@ permissions: | |||||
|
||||||
jobs: | ||||||
vrt: | ||||||
if: ${{!startsWith(github.ref, 'refs/heads/dependabot/') && !startsWith(github.ref, 'refs/heads/changeset-release/') }} | ||||||
# if the branch being merged is a dependabot branch or a changeset release, skip everything in this workflow | ||||||
if: ${{!startsWith(github.head_ref, 'dependabot') && !startsWith(github.head_ref, 'changeset-release') }} | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I may need to also check that it was There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Won't this add additional runs on closed PRs instead of reducing the number of runs against main? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes! I need to exclude it from regular closures instead of "closures that are merges". There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
name: Chromatic | ||||||
runs-on: ubuntu-latest | ||||||
timeout-minutes: 20 | ||||||
|
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.
If we add the below pull_request logic, I think we should remove the push trigger so that we prevent it running twice.