From my point of view, the current workflow is not suitable for efficient development work. Especially the missing snapshots for the Java packages as well as for Docker images are problematic to me. I suggest that every merge to master deploys new development versions of the artifacts. And I suggest that we use dedicated release commits to build releases. With these changes applied, the current two workflows can probably be unified.
As it is not usual to create release commits in a PR, and as the direct push to the main branch is forbidden, I suggest to create a "create release" pipeline that takes two parameters, the release version and the new dev (snapshot) version. This pipeline could than use the Maven release plugin to create the required commits and tags and push them directly to the main branch.
From my point of view, the current workflow is not suitable for efficient development work. Especially the missing snapshots for the Java packages as well as for Docker images are problematic to me. I suggest that every merge to master deploys new development versions of the artifacts. And I suggest that we use dedicated release commits to build releases. With these changes applied, the current two workflows can probably be unified.
As it is not usual to create release commits in a PR, and as the direct push to the main branch is forbidden, I suggest to create a "create release" pipeline that takes two parameters, the release version and the new dev (snapshot) version. This pipeline could than use the Maven release plugin to create the required commits and tags and push them directly to the main branch.