im-open/Build SQL Database
Build a SQL Database with Flyway
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stalelast commit Aug 29, 2024
- License
- MIT
Pinned Snippet
uses: im-open/build-database-ci-action@236bc97b1b61659b2b0850c5e13e0ecd562745eb # v1.0.6tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| db-server-name | The name of the database server to build the database on. | yes | localhost |
| db-server-port | The port that the database server listens on. | no | 1433 |
| db-name | The name of the database to build. | yes | — |
| use-integrated-security | Use domain integrated security. This only works on windows. If running on a linux runner, set this to false or don't specify a value. If false, a db-username and db-password should be specified; if they aren't then the action will attempt to use integrated security. If true, those parameters will be ignored if specified. | no | false |
| trust-server-certificate | Trust Server certificate if it is self signed | no | false |
| db-username | The username to use to login to the database. This is required if use-integrated-security is false, otherwise it's optional and will be ignored. | no | — |
| db-password | The password for the user logging in to the database. This is required if use-integrated-security is false, otherwise it's optional and will be ignored. | no | — |
| migration-files-path | The path to the base directory containing the migration files to process with flyway. Can be a comma separated list of directories. | yes | — |
| install-mock-db-objects | Specifies whether mock db objects should be used to fill out dependencies. If set to true mock-db-object-dependency-list must also be set, otherwise an error will occur. The expected value is true or false. | no | false |
| mock-db-object-dependency-list | A json string containing a list of objects with the name of the dependency package, the version, the url where the package is stored, and optionally a bearer token for authentication. | no | — |
| incremental | Specifies whether to drop and recreate the database before building, or apply to the current database. The expected value is true or false. If true, the create-database-file property will not be used. | no | false |
| create-database-file | The file path to the sql file that initializes the database. This script will only be run if the incremental property is false. | no | — |
| run-tests | Specifies whether or not to run tests. The expected values are true and false. If true, test-files-path should also be set. If false, test-files-path will be ignored. | no | false |
| test-files-path | The path to the files with tSQLt tests. | no | — |
| test-timeout | An optional setting for the allowed wait time, in seconds, for the tests to execute. If tests sometimes hang, or shouldn't take longer than a certain amount of time, this parameter can be helpful. | no | 300 |
| drop-db-after-build | Specifies whether or not to drop the database after building. The expected values are true and false. Set this to false if other steps in the job rely on the database existing. | no | false |
| should-validate-migrations | Determines whether flyway will validate the migration scripts before running them. | no | false |
| seed-data | A switch specifying whether or not to seed data into the database. The expected values are true and false. If true, seed-data-files-path must also be set. | no | false |
| seed-data-files-path | The path to the files with seeding database. | no | — |
| managed-schemas | A comma separated list of schemas that are to be managed by flyway. | no | dbo |
Outputs
no outputs