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

Ignore docs for CI runs #694

Merged
merged 2 commits into from
Jul 1, 2022
Merged

Ignore docs for CI runs #694

merged 2 commits into from
Jul 1, 2022

Conversation

spenserblack
Copy link
Collaborator

This will only run the CI if a contributor has edited

  • the src/ directory
  • the resources/ directory
  • the manifest files

This prevents unnecessary workflow runs. For example, on documentation
changes.

For example, #693 didn't need to be in a "workflow run pending" status since none of the changes are tested by the workflow.

@spenserblack spenserblack requested a review from o2sh as a code owner June 28, 2022 12:51
@spenserblack spenserblack marked this pull request as draft June 28, 2022 12:57
This will only run the CI if a contributor has edited
- the `src/` directory
- the `resources/` directory
- the manifest files

This prevents unnecessary workflow runs. For example, on documentation
changes.
@spenserblack spenserblack marked this pull request as ready for review June 28, 2022 12:58
Copy link
Owner

@o2sh o2sh left a comment

Choose a reason for hiding this comment

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

Great idea @spenserblack 🚀

I left a minor comment.

Comment on lines 5 to 8
paths:
- 'src/**'
- 'resources/**'
- 'Cargo.*'
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
paths:
- 'src/**'
- 'resources/**'
- 'Cargo.*'
paths-ignore:
- "docs/**"
- "**.md"

It may be safer that way.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, I was debating between the two, but you're probably right. But there are a lot of other paths to ignore: assets, config files, etc. But this should prevent the majority of unnecessary runs, so applying.

.github/workflows/ci.yml Outdated Show resolved Hide resolved
Co-authored-by: Ossama Hjaji <ossama-hjaji@live.fr>
@spenserblack spenserblack changed the title Only run CI for source files Ignore docs for CI runs Jul 1, 2022
@o2sh o2sh merged commit 795a420 into o2sh:main Jul 1, 2022
@spenserblack spenserblack deleted the no-build-on-docs branch July 1, 2022 14:04
@Viyom29 Viyom29 mentioned this pull request Jun 30, 2023
@Viyom29
Copy link

Viyom29 commented Jun 30, 2023

This will only run the CI if a contributor has edited

  • the src/ directory

  • the resources/ directory

  • the manifest files

This prevents unnecessary workflow runs. For example, on documentation

changes.

For example, #693 didn't need to be in a "workflow run pending" status since none of the changes are tested by the workflow.

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.

None yet

3 participants