Skip to content

Commit

Permalink
feat: add database default and optional parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
Snootic committed Apr 15, 2024
1 parent d714a92 commit 4a04a82
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/build_nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ jobs:
matrix:
os: [ubuntu-latest]
database: [mysql, mariadb]
ports: [3306, 3307]
env:
DATABASE: ${{ matrix.database }}
DATABASE_URL: localhost:${{ matrix.ports }}
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
Expand All @@ -29,8 +31,8 @@ jobs:
- name: Set up MySQL
uses: mirromutth/[email protected]
with:
host port: 3306
container port: 3306
host port: ${{ matrix.ports }}
container port: ${{ matrix.ports }}
character set server: 'utf8'
collation server: 'utf8_general_ci'
mysql version: '8.0'
Expand All @@ -41,8 +43,8 @@ jobs:
- name: Set up MariaDB
uses: getong/[email protected]
with:
host port: 3306
container port: 3306
host port: ${{ matrix.ports }}
container port: ${{ matrix.ports }}
character set server: 'utf8'
collation server: 'utf8_general_ci'
mariadb version: '10.4.10'
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
spring.datasource.url=jdbc:${DATABASE}://localhost:3306/sphynx_api
spring.datasource.url=jdbc:${DATABASE:mysql}://${DATABASE_URL:localhost:3306}/sphynx_api
spring.datasource.username=${DATABASE_USERNAME:root}
spring.datasource.password=${DATABASE_PASSWORD:root}
spring.flyway.enabled=true
Expand Down

0 comments on commit 4a04a82

Please sign in to comment.