sending useing mail
This commit is contained in:
@@ -26,14 +26,21 @@ jobs:
|
||||
mv "../${ARCHIVE_NAME}" .
|
||||
echo "ARCHIVE_NAME=${ARCHIVE_NAME}" >> $GITHUB_ENV
|
||||
|
||||
- name: Send compressed file to Telegram
|
||||
env:
|
||||
TELEGRAM_BOT_TOKEN: 7068288679:AAGecMnyt9A6R78OQu8nQeISMK1LepX718g
|
||||
TELEGRAM_CHAT_ID: 1198382521
|
||||
- name: Send compressed file via email
|
||||
run: |
|
||||
curl -F document=@"${{ env.ARCHIVE_NAME }}" \
|
||||
-F caption="🚀 Deployment backup from commit: ${{ github.sha }}" \
|
||||
"https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendDocument?chat_id=${TELEGRAM_CHAT_ID}"
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y sendemail libio-socket-ssl-perl libnet-ssleay-perl
|
||||
|
||||
sendemail \
|
||||
-f ftp.notif.manager@gmail.com \
|
||||
-t byeto.net@gmail.com \
|
||||
-u "🚀 Deployment Backup - $(date +%Y-%m-%d)" \
|
||||
-m "Deployment backup from commit: ${{ github.sha }}\nBranch: ${{ github.ref_name }}\nRepository: ${{ github.repository }}\nTimestamp: $(date)" \
|
||||
-s smtp.gmail.com:587 \
|
||||
-xu ftp.notif.manager@gmail.com \
|
||||
-xp ldufbjmidlsosmgq \
|
||||
-o tls=yes \
|
||||
-a "${{ env.ARCHIVE_NAME }}"
|
||||
|
||||
- name: Copy files to server
|
||||
uses: appleboy/scp-action@v0.1.6
|
||||
|
||||
Reference in New Issue
Block a user