Skip to content

Update README

Update README #10

name: sqlserver_2019_ubuntu_22.04
on:
push:
branches: # Change branches as per your requirement.
- main
jobs:
sqlserver:
env:
TZ: Asia/Kolkata
ACCEPT_EULA: Y
MSSQL_SA_PASSWORD: YourPasswordHereOrFromSecrets123
USERNAME: sa
HOST: localhost
runs-on: ubuntu-22.04
services:
mssql:
image: mcr.microsoft.com/mssql/server:2019-latest
ports:
- 1433:1433
env:
TZ: ${{ env.TZ }}
ACCEPT_EULA: ${{ env.ACCEPT_EULA }}
MSSQL_SA_PASSWORD: ${{ env.MSSQL_SA_PASSWORD }}
USERNAME: ${{ env.USERNAME }}
HOST: ${{ env.HOST }}
options: >-
--health-cmd="/opt/mssql-tools18/bin/sqlcmd -S ${HOST} -U ${USERNAME} -P ${MSSQL_SA_PASSWORD} -N -C -l 30 -Q 'SELECT 1' || exit 1"
--health-start-period 10s
--health-interval 10s
--health-timeout 5s
--health-retries 10
steps:
- name: Run sample query
env:
TZ: ${{ env.TZ }}
ACCEPT_EULA: ${{ env.ACCEPT_EULA }}
MSSQL_SA_PASSWORD: ${{ env.MSSQL_SA_PASSWORD }}
USERNAME: ${{ env.USERNAME }}
HOST: ${{ env.HOST }}
run: |
/opt/mssql-tools/bin/sqlcmd -S ${HOST} -U ${USERNAME} -P ${MSSQL_SA_PASSWORD} -N -C -l 30 -Q 'SELECT @@VERSION AS VERSION'