1 Commits

Author SHA1 Message Date
15eb997c92 Create main.yml 2024-09-16 10:08:24 +10:00
4 changed files with 47 additions and 9 deletions

View File

@ -32,7 +32,6 @@ SMTP_PORT=587
SMTP_USERNAME= SMTP_USERNAME=
SMTP_PASSWORD= SMTP_PASSWORD=
SMTP_SECURE=false SMTP_SECURE=false
SMTP_IGNORETLS=false
# Postmark driver config # Postmark driver config
POSTMARK_TOKEN= POSTMARK_TOKEN=

47
.github/workflows/main.yml vendored Normal file
View File

@ -0,0 +1,47 @@
name: Sync Merged-Downstream with Docmost Upstream Main
on:
schedule:
- cron: '0 0 * * *' # Run daily at midnight UTC
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
fetch-depth: 0 # Fetch all history to detect changes properly
- name: Set up git
run: |
git config --global user.name "Shadowfita"
git config --global user.email "www.ryan.palmer@hotmail.com"
- name: Fetch upstream
run: |
git remote add upstream https://github.com/docmost/docmost.git
git fetch upstream
- name: Check if upstream has changes
id: check_changes
run: |
UPSTREAM_DIFF=$(git diff --name-only upstream/main)
if [ -z "$UPSTREAM_DIFF" ]; then
echo "No changes in upstream main branch."
echo "::set-output name=changes::false"
else
echo "Changes detected in upstream main branch."
echo "::set-output name=changes::true"
fi
- name: Merge upstream/main into Merged-Downstream
if: steps.check_changes.outputs.changes == 'true'
run: |
git checkout Merged-Downstream
git merge upstream/main
- name: Push changes to Merged-Downstream
if: steps.check_changes.outputs.changes == 'true'
run: |
git push origin Merged-Downstream

View File

@ -98,13 +98,6 @@ export class EnvironmentService {
return secure === 'true'; return secure === 'true';
} }
getSmtpIgnoreTLS(): boolean {
const ignoretls = this.configService
.get<string>('SMTP_IGNORETLS', 'false')
.toLowerCase();
return ignoretls === 'true';
}
getSmtpUsername(): string { getSmtpUsername(): string {
return this.configService.get<string>('SMTP_USERNAME'); return this.configService.get<string>('SMTP_USERNAME');
} }

View File

@ -41,7 +41,6 @@ export const mailDriverConfigProvider = {
connectionTimeout: 30 * 1000, // 30 seconds connectionTimeout: 30 * 1000, // 30 seconds
auth, auth,
secure: environmentService.getSmtpSecure(), secure: environmentService.getSmtpSecure(),
ignoreTLS: environmentService.getSmtpIgnoreTLS()
} as SMTPTransport.Options, } as SMTPTransport.Options,
}; };