Allow upload only actions to result in no change when version already exists.
When you use the action without an environment name then it only creates a new version in Beanstalk but doesn't deploy it anywhere. This can for example be used if you want to first just upload a version, then run the action again to deploy to many environments in
a matrix action. If a workflow run fails somewhere after you've uploaded the version you might want to run it again. In that case it can be useful to run an upload only action that checks if a version already exists in Beanstalk and does nothing if the version exists.
This can now be done by setting the use_existing_version_if_available
parameter to true
. When it's set to true
and no environment name is set then the action will check if the version exists and exit successfully if it exists. If it doesn't exist the action uploads the version.
Thanks to @n-hebert for the pull-request.