Backup the database with fac-backup-utility #25
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Backup the database with fac-backup-utility | |
### Common Commands: | |
# ./fac-backup-util.sh v0.1.8 initial_backup | |
# ./fac-backup-util.sh v0.1.8 deploy_backup | |
on: | |
workflow_dispatch: | |
inputs: | |
environment: | |
required: true | |
type: choice | |
options: | |
- 'dev' | |
- 'preview' | |
- 'staging' | |
- 'production' | |
util_version: | |
description: Version for fac backup utility to use (ex. vX.Y.Z) | |
required: true | |
type: string | |
backup_operation: | |
description: Operation for fac-backup-utility | |
required: true | |
type: choice | |
options: | |
- 'initial_backup' | |
- 'deploy_backup' | |
- 'on_demand_backup' | |
jobs: | |
fac-backup: | |
name: Perform Database Backup | |
runs-on: ubuntu-latest | |
environment: ${{ inputs.environment }} | |
env: | |
space: ${{ inputs.environment }} | |
steps: | |
- name: Backup FAC Database and Sync Media | |
uses: cloud-gov/cg-cli-tools@main | |
with: | |
cf_username: ${{ secrets.CF_USERNAME }} | |
cf_password: ${{ secrets.CF_PASSWORD }} | |
cf_org: gsa-tts-oros-fac | |
cf_space: ${{ env.space }} | |
command: cf run-task gsa-fac -k 7G -m 3G --name deploy_backup_util --command "./fac-backup-util.sh ${{ inputs.util_version }} ${{ inputs.backup_operation }}" |