Detecting Changes in a Repo's Sub Folders To Build Their Associated Solutions. #129769
Unanswered
MattWalker414
asked this question in
Actions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Select Topic Area
Question
Body
I currently have a workflow that is working fine with regard to the main application it is to build. However, in this repo there is the following folder structure
C:\actions-runner_work\MyApp\MyApp\SubAppsToBuild
In this directory there may be the following sub-structure
What I would like to be able to do if possible is, after the Main application builds, cycle through these subfolders to detect any changes then build the associated SubApp#.sln file. So any changes, even those that might be in SubApp2\SubApp2\MoreSubFolders or below, would trigger the build of SubApp2.sln.
Here is what I've been able to cobble together from various sources...
Trying to build with this code yields the following around this code... git diff --name-only ${{ github.event.before }} ${{ github.sha }} > changes.txt
This resolves to the following during the build... git diff --name-only dde002c5ecd4c12ef4787a2650082686ebbf8e35 b3e0a8135ff8b3fb6c6e1618cc808cb44c9691e0 > changes.txt
The .txt file is created and is empty as I would expect as there were no changed, but the following error occurred...
fatal: bad object dde002c5ecd4c12ef4787a2650082686ebbf8e35
No PlugIn changes found.
Error: Process completed with exit code 1.
I want to detect changes and only build any of the SubApps if changes found in any associated files/folders as they don't change very often so no need to build them all the time or during each build of the Main app.
Hopefully this is possible and I'm headed in the right direction. Any help or guidance would be Greatly Appreciated!
Beta Was this translation helpful? Give feedback.
All reactions