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

Reduce CI runs by ignoring pushes to branch and non-functional files #395

Merged
merged 1 commit into from
May 15, 2024

Conversation

ArneTR
Copy link
Contributor

@ArneTR ArneTR commented May 15, 2024

✅ 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

  • Exclusions added to github workflow when to not run. Markdown files and .vscode directory
  • PR runs on push now only on main branch and on pull_request (any branch.)

@PierreBresson
Copy link
Member

Legit 👍

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