Skip to content
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

Only run CI builds once per PR #548

Merged
merged 3 commits into from
May 5, 2021
Merged

Only run CI builds once per PR #548

merged 3 commits into from
May 5, 2021

Conversation

jonrohan
Copy link
Member

@jonrohan jonrohan commented May 5, 2021

I was noticing that the CI builds run twice per Pull Request.

image

This PR updates the action script to run on pushes on main and any commits to a pr.

@jonrohan jonrohan requested a review from a team May 5, 2021 16:17
@vercel
Copy link

vercel bot commented May 5, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/primer/view-components/B7mQ4TC7kh8Mvs6kFyZswgLC79sS
✅ Preview: https://view-components-git-runcionceonpr-primer.vercel.app

@jonrohan jonrohan enabled auto-merge May 5, 2021 16:18
@vercel vercel bot temporarily deployed to Preview May 5, 2021 16:19 Inactive
Comment on lines 3 to 7
on:
push:
branches:
- main
pull_request:
Copy link
Contributor

@manuelpuyol manuelpuyol May 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm 99% sure we needed both push and PR because of forks

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use pull_request_target which is what I do on primer/css that will run on forks

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Example here primer/css#1357

@vercel vercel bot temporarily deployed to Preview May 5, 2021 16:41 Inactive
@jonrohan jonrohan disabled auto-merge May 5, 2021 16:42
manuelpuyol
manuelpuyol previously approved these changes May 5, 2021
@jonrohan jonrohan merged commit 91108f9 into main May 5, 2021
@jonrohan jonrohan deleted the run_ci_once_on_pr branch May 5, 2021 17:47
@jonrohan
Copy link
Member Author

jonrohan commented May 5, 2021

wait

uh oh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants