Open tusharmath opened 4 days ago
This is actually something I've also been wanting to implement for a while now. Basically, this would be a diff
between a workflow file that current exists and one that will be generated.
Thinking to make use of a package like diff to generate a diff output with a command like npx gwf diff
. I'll add a config option to throw an error on diff but I won't enforce it since this may not be desired behavior for other devs.
I'll probably get something working over the weekend.
I think instead of diff, we just need to perform an equality "check". A simple textual comparison should be enough. I would try to avoid adding a dependency unless really needed.
Expected Behavior
The generated workflow should automatically detect if it has been modified and fail CI if it happens.
Actual Behavior
CI should fail if the generated workflow is out of sync.
Additional Information This is a fantastic tool @emmanuelnk! I have been looking for something like this ever since I moved from https://github.com/sbt/sbt-github-actions
One very useful feature I miss from SBT Github Actions is the
githubWorkflowCheck
setting. When enabled it would automatically check if the generated workflow is out of date and fail the CI if it did.Let me know your thoughts of supporting this feature. Thanks once again for building this amazing tool!