feat(ci, email): configurable SMTP SSL and Docker image build/push workflow#11
Merged
Conversation
- Add EnableSsl property to EmailSettings (default: true) - Use EnableSsl config in EmailService instead of hard-coded true - Add EnableSsl to appsettings.json - Allows disabling SSL for non-secure SMTP servers (e.g., Mailpit on port 1025) - Environment variable override: Email__EnableSsl=false for docker/test environments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces two independent changes:
EnableSslflag onSmtpClientis now driven by configuration instead of being hard-coded, so deployments that target SMTP servers without TLS (e.g. internal relays) can opt out.sensenetcsp/sn-auth) on pushes to the main branches, validates the build on pull requests, and exposes a manual trigger for ad-hoc builds from any branch.Changes
Email / SMTP
EmailSettings.EnableSsl(bool, defaulttrue) added.EmailServicenow readsEnableSslfromEmailSettingsinstead of hard-codingtrue.appsettings.jsonextended with the newEnableSslkey (defaulttrue, preserves existing behavior).CI / Docker
.github/workflows/docker-image.yml.pushtodevelop,main,master→ build and push image.pull_request(non-draft) targetingdevelop,main,master→ build only (validation, no push).workflow_dispatch→ manual run from any branch, with optionalpush_imageandcustom_taginputs.docker/metadata-action)::<branch-name>for any push or PR build.:latestonly when pushing tomainormaster(independent of which branch is set as default in GitHub).:previewonly when pushing todevelop.:pr-<number>for pull request builds.:<custom_tag>when supplied via manual dispatch.src/sn-auth/Dockerfile.DOCKERHUB_USERNAMEandDOCKERHUB_TOKEN, and only runs when an actual push is going to happen.Behavior notes
EnableSsldefaults totrue, so existing deployments are unaffected unless they explicitly opt out.Run workflowbutton (manual dispatch) only becomes visible in the GitHub Actions UI after this workflow lands on the default branch.Testing
pull_requesttrigger, validating that the Docker image builds end-to-end without pushing to the registry.