Reduce CI runs by ignoring pushes to branch and non-functional files #395
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
✅ I have read the contributing file
Summary
While submitting a PR for Eco-CI (#393) I noticed that the pipeline was triggering two times everytime I push to the branch of the PR.
To my understanding this was because the on-trigger was set to push and pull_request without limiting it to a specific branch.
I this submit a PR that will trigger on-push runs only on the main branch.
This change however follows the idea that every addition to the code is either pushed directly to main or always coming through a feature-branch that will be merged in through a pull-request.
For pushes to pull-requests the trigger will still run, meaning that all pushes to a PR will trigger a new CI run.
Furthermore I added some exclusions that will not trigger runs like for instance markdown files and the
.vscode
directory.Feel free to add more directories that are deemed non-functional.
The intention of this PR is to reduce CI runs and this save a bit of energy, Github minutes and potentially CO2.
Hope you like the addition!
Changelog