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

ci: only trigger on pushes to main branches #196

Merged
merged 2 commits into from
Aug 18, 2022
Merged

ci: only trigger on pushes to main branches #196

merged 2 commits into from
Aug 18, 2022

Conversation

Fdawgs
Copy link
Member

@Fdawgs Fdawgs commented Aug 9, 2022

See fastify/workflows#56.

This will stop PRs from running the CI workflows twice (one for the PR and one for the push to the PR), which will cut down run times for Dependabot PRs that wait for both to complete before merging, and the time waiting for all checks to complete for normal PRs (see https://github.com/fastify/fastify-helmet/pull/195/checks).

If happy with this then i will apply to rest of the repos.

Checklist

@Fdawgs Fdawgs requested review from mcollina and Uzlopak August 9, 2022 06:52
Copy link
Member

@climba03003 climba03003 left a comment

Choose a reason for hiding this comment

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

How about version branches?

The trigger is the limitation of Github itself and I would accept the current state.
It is actually cause only when you have access to the repo.

If someone really don't want to trigger the push event, you can actually Fork and PR.

@Fdawgs
Copy link
Member Author

Fdawgs commented Aug 9, 2022

How about version branches?

Could add something like - 'v*'?

@Eomm
Copy link
Member

Eomm commented Aug 16, 2022

Could add something like - 'v*'?

Yes, we always use that pattern.

Maybe just v[0-9.-]{1,8} if we want to be stricter

@Fdawgs
Copy link
Member Author

Fdawgs commented Aug 18, 2022

Could add something like - 'v*'?

Yes, we always use that pattern.

Maybe just v[0-9.-]{1,8} if we want to be stricter

Doesn't appear to like the curly braces, and it's not one of the allowed values in filter list.

A suggested alternative on that page is v[0-9]+.[0-9]+.[0-9]+.

@Fdawgs Fdawgs marked this pull request as draft August 18, 2022 08:25
Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@Uzlopak
Copy link
Contributor

Uzlopak commented Aug 18, 2022

Just nagging here:
What if somebody wants to do a -rc1 suffix?

@Fdawgs Fdawgs marked this pull request as ready for review August 18, 2022 12:11
@Fdawgs
Copy link
Member Author

Fdawgs commented Aug 18, 2022

Just nagging here: What if somebody wants to do a -rc1 suffix?

Sorted, just using 'v*' now.

Copy link
Contributor

@Uzlopak Uzlopak left a comment

Choose a reason for hiding this comment

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

LGTM

Worst case scenaria if somebody creates a branch "very-good" is that the pipeline runs twice. I think this is acceptable.

Copy link
Member

@climba03003 climba03003 left a comment

Choose a reason for hiding this comment

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

I am not sure if it worth.
The push CI is run on the branch and the pull request CI is run on pull request.
Which means, every new branch will not be run if it does not send PR.

No, CI test on feature branch.

I am not blocked to land this, it just worth it or not. Will someone actually use feature-branch and check CI?

Copy link
Member

@Eomm Eomm left a comment

Choose a reason for hiding this comment

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

I think it worth trying this configuration.

We don't push code into the repo without PR, except the bump version one, so I don't see blockers here.

What I like most about this PR (if it works) is that we don't waste resources (electricity, logs, disk, network)

Merging

@Eomm Eomm merged commit 584b110 into master Aug 18, 2022
@Eomm Eomm deleted the Fdawgs-patch-1 branch August 18, 2022 16:46
@Eomm Eomm mentioned this pull request Aug 18, 2022
5 tasks
@Fdawgs
Copy link
Member Author

Fdawgs commented Feb 9, 2023

What's been the general consensus on this? Worth adding to other repos?

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.

5 participants