Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
dipsx committed Jul 19, 2024
1 parent 31a110f commit f54c4e4
Showing 1 changed file with 5 additions and 29 deletions.
34 changes: 5 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,33 +43,15 @@ This action applies database migrations and idempotent scripts to a specified da
## Example usage

```yaml
name: Test Migrations
name: Apply migrations

on:
workflow_dispatch:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
test-migrations:
runs-on: ubuntu-latest

services:
postgres:
image: postgres:16
env:
POSTGRES_DB: testdb
POSTGRES_PASSWORD: testpassword
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v3

Expand All @@ -79,16 +61,10 @@ jobs:
connection-string-host: postgres
connection-string-port: 5432
connection-string-database: testdb
connection-string-username: postgres
connection-string-password: testpassword
# connection-string-username: postgres
# connection-string-password: testpassword
aws-sm-region: ca-central-1
aws-sm-db-credentials-key: some-key
migrations-scripts-path: "./db/migrations-scripts"
idempotent-scripts-path: "./db/idempotent-scripts"

- name: Verify Migrations
run: |
PGPASSWORD=testpassword psql -h localhost -U postgres -d testdb -c "
-- Check if the procedure and table was created
CALL insert_into_test_table('test_record');
SELECT * FROM test_table;
"
```

0 comments on commit f54c4e4

Please sign in to comment.