19 lines
639 B
YAML
19 lines
639 B
YAML
name: Staging DB Snapshot
|
|
on:
|
|
schedule:
|
|
- cron: "0 4 * * 1-5" # At 04:00 on every day-of-week from Monday through Friday.
|
|
workflow_dispatch:
|
|
jobs:
|
|
db-staging-snapshot:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Install Snaplet CLI
|
|
run: curl -sL https://app.snaplet.dev/get-cli/ | bash
|
|
- name: Restore Snapshot
|
|
run: snaplet snapshot restore -y
|
|
env:
|
|
SNAPLET_DATABASE_URL: ${{ secrets.SNAPLET_DATA_TARGET_DB_URL }}
|
|
SNAPLET_ACCESS_TOKEN: ${{ secrets.SNAPLET_ACCESS_TOKEN }}
|
|
SNAPLET_DATABASE_ID: ${{ secrets.SNAPLET_DATABASE_ID }}
|