Skip to content

Run Scripts

Run Scripts #1

Workflow file for this run

name: Run PostgreSQL scripts
on: workflow_dispatch
jobs:
run_scripts:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Read JSON and run scripts
run: |
scripts=$(jq -r '.scripts[]' migrations/spec.json)
for script in $scripts; do
psql -d ${{ secrets.DB_URL }} -a -f migrations/$script
done
working-directory: ${{ github.workspace }}