The missing action for SQL Server 🎉
- Simpler than containers
- Works on Linux and Windows
- Supports different versions
Add it as a step to your workflow
- uses: ankane/setup-sqlserver@v1
with:
accept-eula: true
accept-eula
confirms your acceptance of the End-User Licensing Agreement
Specify a version
- uses: ankane/setup-sqlserver@v1
with:
accept-eula: true
sqlserver-version: 2019
Currently supports
Version | 2022 |
2019 |
---|---|---|
ubuntu-24.04 |
||
ubuntu-22.04 |
default | |
ubuntu-20.04 |
default | ✓ |
windows-2022 |
default | ✓ |
windows-2019 |
default | ✓ |
Test against multiple versions
strategy:
matrix:
sqlserver-version: [2022, 2019]
steps:
- uses: ankane/setup-sqlserver@v1
with:
accept-eula: true
sqlserver-version: ${{ matrix.sqlserver-version }}
Create a database
- run: sqlcmd -U SA -P 'YourStrong!Passw0rd' -Q 'CREATE DATABASE testdb'
Run queries
- run: sqlcmd -U SA -P 'YourStrong!Passw0rd' -d testdb -Q 'SELECT @@VERSION'
Linux
- Install SQL Server and create a database on Ubuntu
- Unattended SQL Server installation script for Ubuntu
Windows
- Install SQL Server from the Command Prompt
- Automating SQL Server Deployment with Packer, Terraform, and Ansible
Everyone is encouraged to help improve this project. Here are a few ways you can help:
- Report bugs
- Fix bugs and submit pull requests
- Write, clarify, or fix documentation
- Suggest or add new features