Skip to content

Commit

Permalink
Merge pull request #23 from vase/staging
Browse files Browse the repository at this point in the history
add staging-backup action
  • Loading branch information
asyrique authored Sep 7, 2024
2 parents ed0e065 + e5d1aff commit d8bb52d
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/staging-backup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Staging Mongo Backup

on:
workflow_dispatch:
# schedule:
# - cron: '23 7/12 * * *'

jobs:
backup:
name: Backup MongoDB to GSuite
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Setup mongodb-tools
run: |
wget https://fastdl.mongodb.org/tools/db/mongodb-database-tools-ubuntu2204-x86_64-100.10.0.deb
sudo apt install ./mongodb-database-tools-*-100.10.0.deb
mongodump --version
- name: Setup Rclone
uses: AnimMouse/setup-rclone@v1
with:
rclone_config: ${{ vars.RCLONE_CONFIG }}
- name: Add Rclone service account file
uses: AnimMouse/setup-rclone/service-account-file@v1
with:
service_account_filename: service-account-file.json
service_account_file: ${{ secrets.SERVICE_ACCOUNT_FILE_802242FDC2C47926869E5B2E96742D38B66A392C }}
- run: |
rclone lsd engineeringbackup:

0 comments on commit d8bb52d

Please sign in to comment.