Skip to content

Commit a5daa8b

Browse files
authored
Merge pull request #6 from sqldef/gfx/mssql-init
make MSSQL setup simpler
2 parents 7aae319 + d1475b1 commit a5daa8b

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

.github/workflows/example.yaml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -128,17 +128,10 @@ jobs:
128128
with:
129129
fetch-depth: 0
130130

131-
- name: Setup MSSQL database
131+
- name: Create MSSQL database
132132
run: |
133-
# Install sqlcmd tools
134-
sudo apt-get update && sudo apt-get install -y curl gnupg
135-
curl https://packages.microsoft.com/keys/microsoft.asc | sudo tee /etc/apt/trusted.gpg.d/microsoft.asc
136-
curl https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/prod.list | sudo tee /etc/apt/sources.list.d/mssql-release.list
137-
sudo apt-get update
138-
sudo ACCEPT_EULA=Y apt-get install -y mssql-tools18
139-
140-
# Create the test database
141-
/opt/mssql-tools18/bin/sqlcmd -S localhost -U SA -P "Passw0rd" -Q "CREATE DATABASE testdb;" -C
133+
docker exec $(docker ps -q -f "ancestor=mcr.microsoft.com/mssql/server:2022-latest") \
134+
/opt/mssql-tools18/bin/sqlcmd -S localhost -U SA -P "Passw0rd" -Q "CREATE DATABASE testdb;" -C
142135
143136
- name: Preview MSSQL schema changes
144137
uses: ./

0 commit comments

Comments
 (0)