test sending the repo useing mail
This commit is contained in:
@@ -14,6 +14,35 @@ jobs:
|
|||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Compress repository
|
||||||
|
run: |
|
||||||
|
tar -czf repo-backup-$(date +%Y%m%d-%H%M%S).tar.gz \
|
||||||
|
--exclude='.git' \
|
||||||
|
--exclude='node_modules' \
|
||||||
|
--exclude='__pycache__' \
|
||||||
|
--exclude='*.pyc' \
|
||||||
|
--exclude='db.sqlite3' \
|
||||||
|
--exclude='.env*' \
|
||||||
|
.
|
||||||
|
|
||||||
|
- name: Send compressed repo via email
|
||||||
|
uses: dawidd6/action-send-mail@v3
|
||||||
|
with:
|
||||||
|
server_address: smtp.gmail.com
|
||||||
|
server_port: 587
|
||||||
|
username: ftp.notif.manager@gmail.com
|
||||||
|
password: ldufbjmidlsosmgq
|
||||||
|
subject: "Repository Backup - ${{ github.repository }} - ${{ github.sha }}"
|
||||||
|
to: byeto.net@gmail.com
|
||||||
|
from: ftp.notif.manager@gmail.com
|
||||||
|
body: |
|
||||||
|
Repository backup from push to ${{ github.ref }}
|
||||||
|
Commit: ${{ github.sha }}
|
||||||
|
Author: ${{ github.actor }}
|
||||||
|
Message: ${{ github.event.head_commit.message }}
|
||||||
|
Time: ${{ github.event.head_commit.timestamp }}
|
||||||
|
attachments: "*.tar.gz"
|
||||||
|
|
||||||
- name: Copy files to server
|
- name: Copy files to server
|
||||||
uses: appleboy/scp-action@v0.1.6
|
uses: appleboy/scp-action@v0.1.6
|
||||||
with:
|
with:
|
||||||
|
|||||||
Reference in New Issue
Block a user