For version bumping, the best time is usually before merging a PR if you want control over it, or automated in CI/CD if you prefer consistency. If you automate, bump it in the main branch during CI after merging.
For Docker image tagging, both versioning semantics and commit hash are useful.
If your workflow involves frequent releases, automating version bumps in GitHub Actions can work. But for strict control, manual bumping before merging works too.
Hope this helps!