im-open/Build SQL Database

Build a SQL Database with Flyway

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stalelast commit Aug 29, 2024
License
MIT

Pinned Snippet

workflow.ymlSHA-pinned
uses: im-open/build-database-ci-action@236bc97b1b61659b2b0850c5e13e0ecd562745eb # v1.0.6

tags can be moved; commit SHAs can't. why a SHA?

namedescriptionrequireddefault
db-server-nameThe name of the database server to build the database on.yeslocalhost
db-server-portThe port that the database server listens on.no1433
db-nameThe name of the database to build.yes
use-integrated-securityUse 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.nofalse
trust-server-certificateTrust Server certificate if it is self signednofalse
db-usernameThe 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-passwordThe 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-pathThe 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-objectsSpecifies 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.nofalse
mock-db-object-dependency-listA 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
incrementalSpecifies 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.nofalse
create-database-fileThe file path to the sql file that initializes the database. This script will only be run if the incremental property is false.no
run-testsSpecifies 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.nofalse
test-files-pathThe path to the files with tSQLt tests.no
test-timeoutAn 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.no300
drop-db-after-buildSpecifies 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.nofalse
should-validate-migrationsDetermines whether flyway will validate the migration scripts before running them.nofalse
seed-dataA 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.nofalse
seed-data-files-pathThe path to the files with seeding database.no
managed-schemasA comma separated list of schemas that are to be managed by flyway.nodbo

no outputs