forked from valerianpereira/backup-action
-
Notifications
You must be signed in to change notification settings - Fork 0
92 lines (84 loc) · 2.5 KB
/
Copy pathci.yml
File metadata and controls
92 lines (84 loc) · 2.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: Backup Action Test
on: pull_request_target
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: Backup MySQL DB
uses: ./
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
port: ${{ secrets.PORT }}
key: ${{ secrets.DEPLOY_KEY }}
type: db
db_type: mysql
db_user: ${{ secrets.MYSQL_USER }}
db_pass: ${{ secrets.MYSQL_PASS }}
db_port: 3306
db_name: world
- name: Backup Mongo DB
uses: ./
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }} # Defaults to root
password: ${{ secrets.PASSWORD }}
port: ${{ secrets.PORT }}
key: ${{ secrets.DEPLOY_KEY }}
type: db
db_type: mongo
db_user: webgeeksAdmin
db_pass: DD9e3H9Gp?X#nZNA
db_port: 27017
# auth_db: ${{ secrets.authenticationDatabase }} # Required for Mongo DB v4.4.0 - Defaults to admin
db_name: world
- name: Backup Postgres DB
uses: ./
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }} # Defaults to root
password: ${{ secrets.PASSWORD }}
port: ${{ secrets.PORT }}
key: ${{ secrets.DEPLOY_KEY }}
type: db
db_type: postgres
db_user: webgeeks
db_pass: awkswBPByT258c3
db_port: 5432 # Defaults to 5432
db_name: world
- name: SSH Password - Login Backup Directory
uses: ./
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }} # Defaults to root
password: ${{ secrets.PASSWORD }}
port: ${{ secrets.PORT }}
key: ${{ secrets.DEPLOY_KEY }}
type: directory
dirpath: /var/www/html
- name: SSH Key Login - Backup a Directory + Additional Commands to run Simultaneously
uses: ./
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
port: ${{ secrets.PORT }}
key: ${{ secrets.DEPLOY_KEY }}
type: directory
dirpath: /var/www/html
script: |
whoami
ls -al
- name: Simply Run SSH Commands to Remote Server
uses: ./
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
port: ${{ secrets.PORT }}
key: ${{ secrets.DEPLOY_KEY }}
script: |
whoami
ls -al