I have a GitHub Actions workflow that detects changes in folders when I create a pull request and rebuilds any modified folders. However, if a PR modifies 100 folders, all of those folders get rebuilt with every new commit, even if the latest commit only affects one folder.
Additionally, I need to keep track of failed builds. For example, if builds for folders X and Y failed, and I then modify folder Z in a new commit, the workflow should still just fail X and Y build because they were not fixed. How can I optimize this process to rebuild only the necessary folders based on the last commit while ensuring that failed builds from previous runs aren’t skipped?
- uses: dorny/paths-filter@v2
id: filter
with:
filters: .github/files.globs.yml