-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (31 loc) · 1.19 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
## Secrets Required: Azure SQL Connection String:
# AZURE_SQL_CONNECTION_STRING: 'Server=tcp:yourserver.database.windows.net,1433;Initial Catalog=yourdatabase;Persist Security Info=False;User ID=yourusername;Password=yourpassword;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;'
name: Deploy dacpac package to Azure SQL
on:
workflow_dispatch:
inputs:
environment:
description: 'Environment'
required: true
default: 'dev'
options:
dev:
- 'dev'
staging:
- 'staging'
prod:
- 'prod'
jobs:
build:
runs-on: ubuntu-latest
environment:
name: ${{ github.event.inputs.environment }}
steps:
- uses: actions/checkout@v4
- uses: azure/[email protected]
with:
connection-string: ${{ secrets.AZURE_SQL_CONNECTION_STRING }}
path: './DbProject/DbProject.sqlproj'
action: 'publish'
build-arguments: '-c Release' # Optional build options passed to dotnet build
arguments: '/p:DropObjectsNotInSource=true' # Optional properties and parameters for SqlPackage Publish