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: doc: restore tj-actions/changed-files to only build docs when doc files are changed #87153

Merged
merged 5 commits into from
Mar 19, 2025

Conversation

kartben
Copy link
Collaborator

@kartben kartben commented Mar 15, 2025

Restore the use of tj-actions/changed-files action + related housekeeping.

@kartben kartben force-pushed the doc_files_changed branch 5 times, most recently from d636951 to 043348e Compare March 15, 2025 15:56
@str4t0m
Copy link
Collaborator

str4t0m commented Mar 15, 2025

Thanks for coming up with a fix so quickly already, I was about to start crafting one up as well.
Looking the file history I noticed that this proposed approach was used before commit a9f77a5 and was changed in order to be able to enforce the branch checks also when the job is skipped. Does that still apply?

@kartben kartben force-pushed the doc_files_changed branch from 7924f2e to 09caebb Compare March 15, 2025 16:10
@kartben kartben requested review from nashif and fabiobaltieri March 15, 2025 16:11
@kartben kartben marked this pull request as ready for review March 15, 2025 16:11
@zephyrbot zephyrbot requested a review from stephanosio March 15, 2025 16:12
@kartben
Copy link
Collaborator Author

kartben commented Mar 15, 2025

Thanks for coming up with a fix so quickly already, I was about to start crafting one up as well. Looking the file history I noticed that this proposed approach was used before commit a9f77a5 and was changed in order to be able to enforce the branch checks also when the job is skipped. Does that still apply?

good question - @nashif?

@kartben kartben marked this pull request as draft March 15, 2025 16:19
@kartben
Copy link
Collaborator Author

kartben commented Mar 15, 2025

mmh going back to draft - I think @str4t0m comment very much applies. If no "doc" file is touched then the workflow will not report an OK status causing PR to not be considered mergeable. Need to look more closely -- luckily we have a fix already deployed in main anyway

@nashif
Copy link
Member

nashif commented Mar 19, 2025

probably we want to revert to the old state of things and use the same action as before, the way it was done solved many issues.

@nashif
Copy link
Member

nashif commented Mar 19, 2025

probably we want to revert to the old state of things and use the same action as before, the way it was done solved many issues.

ok, maybe I should have gone into the details, the problem here is that we want this check to pass, if the workflow is skipped because it does not match files, then GH will not allow PRs to be merged because it never got to running the workflow.

@kartben kartben force-pushed the doc_files_changed branch from 09caebb to 1c1726d Compare March 19, 2025 06:47
@kartben kartben changed the title ci: update doc-build workflow file change detection ci: doc: restore tj-actions/changed-files to only build docs when doc files are changed Mar 19, 2025
@kartben kartben marked this pull request as ready for review March 19, 2025 06:50
kartben added 5 commits March 19, 2025 14:32
This reverts commit b805266
and restores the original use of looking for changed files
before triggering a documentation build.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Following the revert in the previous commit, pin the actions/checkout
action to align with what is now the accepted practice in the project.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Ensure we run the latest version of this action (and align with what is
already used for bsim-tests)

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
There is no need to trigger a doc build when tests are being
changed.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Building docs just works on vanilla GH runner so it can be convenient
to not prevent the workflow to run on forks.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
@kartben kartben force-pushed the doc_files_changed branch from 1c1726d to fc93231 Compare March 19, 2025 13:44
@kartben kartben requested a review from pdgendt March 19, 2025 13:49
@nashif nashif added the Hotfix Fix for issues blocking development, i.e. CI issues, tests failing in CI, etc. label Mar 19, 2025
@nashif nashif merged commit f254b57 into zephyrproject-rtos:main Mar 19, 2025
18 checks passed
@kartben kartben deleted the doc_files_changed branch March 20, 2025 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Continuous Integration Hotfix Fix for issues blocking development, i.e. CI issues, tests failing in CI, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants