-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Expected Behavior
The action doesn't de-facto revert commits made between checkout and execution of the action.
Current Behavior
Right now if a commit is made to the target branch between the workflow running @actions/checkout and commit-changes-action, commit-changes-action will commit the older version of the file (assuming the glob covers that file). This essentially results in the action reverting commits which can be counterintuitive.
Possible Solution
Best solution is probably to shell out to git and only commit files that match the glob and have changes (with an option to tune this behaviour).
Also documenting this edge case would be helpful, especially in encouraging users to tune the glob to match as few files as possible.
Context
This issue was found when changes on master were being overridden. It was fixed in the short term by tuning the glob to cover only the files the workflow had made changes to.
Your Environment
N/A will affect any environment