Commit Neon Dump #86
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: 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 |