Skip to content

Commit 3ebcc99

Browse files
committed
Add baseline-schema-file param and configure workflow to use example files
1 parent 550f7f2 commit 3ebcc99

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

.github/workflows/example.yaml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ name: SQLDef Preview Example
22

33
on:
44
pull_request:
5-
paths:
6-
- 'schema.sql'
5+
push:
6+
branches:
7+
- example
78

89
jobs:
910
postgresql-preview:
@@ -35,7 +36,8 @@ jobs:
3536
with:
3637
command: psqldef
3738
version: latest
38-
schema-file: schema.sql
39+
baseline-schema-file: examples/psqldef-current.sql
40+
schema-file: examples/psqldef-desired.sql
3941
pg-user: postgres
4042
pg-password: postgres
4143
pg-host: localhost
@@ -70,7 +72,8 @@ jobs:
7072
with:
7173
command: mysqldef
7274
version: latest
73-
schema-file: schema.sql
75+
baseline-schema-file: examples/mysqldef-current.sql
76+
schema-file: examples/mysqldef-desired.sql
7477
mysql-user: root
7578
mysql-password: root
7679
mysql-host: localhost
@@ -91,7 +94,8 @@ jobs:
9194
with:
9295
command: sqlite3def
9396
version: latest
94-
schema-file: schema.sql
97+
baseline-schema-file: examples/sqlite3def-current.sql
98+
schema-file: examples/sqlite3def-desired.sql
9599
sqlite-database: test.db
96100

97101
mssql-preview:
@@ -132,7 +136,8 @@ jobs:
132136
with:
133137
command: mssqldef
134138
version: latest
135-
schema-file: schema.sql
139+
baseline-schema-file: examples/mssqldef-current.sql
140+
schema-file: examples/mssqldef-desired.sql
136141
mssql-user: sa
137142
mssql-password: YourStrong@Passw0rd
138143
mssql-host: localhost

action.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ inputs:
1111
schema-file:
1212
description: 'Path to the schema file'
1313
required: true
14+
baseline-schema-file:
15+
description: 'Path to the baseline schema file for comparison (optional)'
16+
required: false
1417
version:
1518
description: 'Version of sqldef to use'
1619
required: false

0 commit comments

Comments
 (0)