mirror of
https://github.com/tj-actions/pg-dump.git
synced 2024-12-20 01:18:49 +00:00
Merge pull request #1 from tj-actions/add-backup-step
This commit is contained in:
commit
de6a042063
1 changed files with 21 additions and 0 deletions
21
.github/workflows/test.yml
vendored
21
.github/workflows/test.yml
vendored
|
@ -27,6 +27,7 @@ jobs:
|
|||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Run pg_dump
|
||||
uses: ./
|
||||
with:
|
||||
|
@ -43,3 +44,23 @@ jobs:
|
|||
if: steps.changed_backup.outputs.files_changed == 'true'
|
||||
run: |
|
||||
exit 1;
|
||||
|
||||
- name: Commit changes to backup file.
|
||||
if: failure()
|
||||
run: |
|
||||
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git config --local user.name "github-actions[bot]"
|
||||
git add backups/backup.sql
|
||||
git commit -m "Auto updated backup.sql."
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v3
|
||||
if: failure()
|
||||
with:
|
||||
base: "main"
|
||||
title: "[Backup] Updated test database backup"
|
||||
branch: "chore/update-test-db-backup"
|
||||
commit-message: "Modified test database backup using latest migration changes."
|
||||
body: "Updated test database backup."
|
||||
reviewers: "jackton1"
|
||||
token: ${{ secrets.PAT_TOKEN }}
|
||||
|
|
Loading…
Add table
Reference in a new issue