Skip to content

Commit 6104e78

Browse files
Update SQL engine setup in build workflow
Adds Docker-based SQL engine setup for Linux runners and restricts mssqlsuite installation to macOS and Windows. This improves environment consistency and leverages Docker for Linux builds.
1 parent 9845732 commit 6104e78

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

.github/workflows/build-release.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,18 @@ jobs:
161161
steps:
162162
- uses: actions/checkout@v4
163163

164-
- name: Install local SQL engine via mssqlsuite
164+
- name: Setup docker images (Linux only)
165+
if: matrix.os == 'ubuntu-latest'
166+
run: |
167+
# create a shared network
168+
docker network create localnet
169+
# Expose engine and endpoint then setup a shared path for migrations
170+
docker run -p 1433:1433 --volume shared:/shared:z --name mssql1 --hostname mssql1 --network localnet -d dbatools/sqlinstance
171+
# Expose second engine and endpoint on different port
172+
docker run -p 14333:1433 --volume shared:/shared:z --name mssql2 --hostname mssql2 --network localnet -d dbatools/sqlinstance2
173+
174+
- name: Install local SQL engine via mssqlsuite (macOS/Windows only)
175+
if: matrix.os != 'ubuntu-latest'
165176
uses: potatoqualitee/[email protected]
166177
with:
167178
install: sqlengine

0 commit comments

Comments
 (0)