Skip to content

Commit Neon Dump

Commit Neon Dump #85

name: Commit Neon Dump
on:
schedule:
- cron: "0 10 * * *"
workflow_dispatch: {}
jobs:
commit_neon_dump:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:15
steps:
- name: Checkout repository
uses: actions/[email protected]
with:
token: ${{ secrets.CELESTIA_PAT }}
- name: Dump database
uses: tj-actions/pg-dump@v3
with:
postgresql_version: "15"
database_url: postgres://${{ secrets.NEON_USER }}:${{ secrets.NEON_PASSWORD }}@${{ secrets.NEON_HOST }}/${{ secrets.DATABASE }}
path: ./packages/celestia-database/db_dumps/celestia_dump.sql
options: "-Fc -v"
- name: Git Add/Commit database dump
uses: EndBug/[email protected]
with:
add: "./packages/celestia-database/db_dumps/celestia_dump.sql --force"
committer_email: [email protected]
committer_name: Codykilpatrick
message: "Commit current database dump [skip ci]"
pull: --rebase --autostash
push: origin ${{ github.head_ref }} --set-upstream --force