Skip to content

(A) Database to artifact #453

(A) Database to artifact

(A) Database to artifact #453

Workflow file for this run

name: (A) Database to artifact
on:
workflow_dispatch:
schedule:
- cron: '16 11 * * *'
permissions:
contents: write
actions: read
pull-requests: write
jobs:
build:
name: Grab backup and fix backup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/dingorunner
env:
runner: bkup
terminus_api: ${{ secrets.TERMINUS_API }}
SSH_PRIVATE_KEY: ${{ secrets.PANTHEON_DEPLOY_KEY}}
site_name: ${{ secrets.TERMINUS_SITE_NAME }}
env: live
- id: Lando
uses: necyberteam/amp_lando_start@v1
with:
DATABASE: ''
GH_TOKEN_REPO: ${{ secrets.GH_TOKEN_REPO }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Sanitize backup
run: |
lando drush sql-sanitize --sanitize-password -y
lando drush deploy
lando drush en amp_dev
lando drush pmu amp_dev
lando drush cr
lando db-export site.sql
env:
gh_token: ${{ secrets.GH_TOKEN_REPO }}
- name: 'Upload Backup Artifact'
uses: actions/upload-artifact@v3
with:
name: amp-daily-backup
path: site.sql.gz
retention-days: 5