-
-
Notifications
You must be signed in to change notification settings - Fork 20
/
backup-dir-push-to-github.yml
42 lines (37 loc) · 1.03 KB
/
backup-dir-push-to-github.yml
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
name: Backup Directory & Push to Github
on:
schedule:
- cron: "0 0 * * *" # Every Day at Midnight
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: Backup a Directory
uses: valerianpereira/backup-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
port: ${{ secrets.PORT }}
key: ${{ secrets.DEPLOY_KEY }}
type: directory
dirpath: /var/www/html
# This is just an example use case, not tested.
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v3
with:
commit-message: directory backups
branch: directory-backups
title: 'Auto Backup Directory'
body: |
This PR includes
- backups of `/var/www/html`
Auto-generated by [create-pull-request][1]
labels: |
backups
automated pr
reviewers: dr5hn
draft: false