Remove duplicate "skip" workflows from CI, now skipping jobs inside of the same workflows#820
Remove duplicate "skip" workflows from CI, now skipping jobs inside of the same workflows#820jormundur00 merged 7 commits intomasterfrom
Conversation
…f the same workflows
|
Currently, all new workflows don't run because of the need to whitelist The error is: Also, we should probably consider adding the jobs |
|
Can we generate a simplified version of this action in this repo? |
f55b601 to
7f3479a
Compare
7f3479a to
c965eda
Compare
I’ve created a minimal in-repo version of this action that covers only the specific use-cases we need, rather than the full |
| @@ -0,0 +1,17 @@ | |||
| name: "Detect file changes" | |||
There was a problem hiding this comment.
Maybe call it better than action.yml?
There was a problem hiding this comment.
The yml file that designates an action must be named action.yml (or action.yaml, see).
| @@ -0,0 +1,161 @@ | |||
| // In-repo file change filter for GitHub pull request workflows. | |||
There was a problem hiding this comment.
Renamed it to detect-file-changes.js (like the action itself). Also, added documentation and example to the js.
| @@ -0,0 +1,161 @@ | |||
| // In-repo file change filter for GitHub pull request workflows. | |||
| // | |||
There was a problem hiding this comment.
Did you test on forks, and regular branches?
There was a problem hiding this comment.
I've tested it on a fork, opening a pull request to the master branch of the fork (with different combinations of changed files). These workflows are ran only on pull_request (an exception being scan-docker-images.yml also running on schedule), so only creating a branch doesn't run them (given the on: pull_request: rules still being set, like they currently are on master, just without filters).
P.S: test-changed-metadata and test-changed-infrastructure only run their actual tests if github.repository == 'oracle/graalvm-reachability-metadata', so I manually changed these on the fork to test functionality.
ban-mi
left a comment
There was a problem hiding this comment.
Added some suggestions in the js file 🙏
Co-authored-by: Betty Mann <[email protected]>
What does this PR do?
This PR removes the duplicate “skip” workflows that existed only to report successful checks when no relevant files changed. Previously, each CI workflow had a corresponding “skip” workflow, doubling the number of workflow files and cluttering the GitHub Actions page.
This PR consolidates the skip logic inside individual jobs and steps using the in-repo
detect-file-changesaction. With this change:detect-file-changesstepThis simplifies workflow maintenance, reduces visual clutter in the Actions UI, and preserves accurate reporting of required jobs.
Fixes: #791