Skip to content

Commit 96cea35

Browse files
authored
release prep (#199)
1 parent 776d406 commit 96cea35

File tree

2 files changed

+30
-12
lines changed

2 files changed

+30
-12
lines changed

CONNECTION.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,24 @@ Azure SQL Action for GitHub is supported for the Azure public cloud as well as A
2626
- If the Azure/login action is not included, then the sql action would fail with a firewall exception and appropriate messaging.
2727
- Alternatively, if enough permissions are not granted on the service principal or login action is not included, then the firewall rules have to be explicitly managed by user using CLI/PS scripts.
2828

29-
## Azure SQL Managed Instance and SQL Server
29+
## Azure SQL Managed Instance
3030

31-
GitHub sql-action requires that prior to running the action against Azure SQL Managed Instance or SQL Server, the workflow must have network access to the SQL instance. For network architectures where public access is not available, [self-hosted runners](https://docs.github.com/actions/hosting-your-own-runners/about-self-hosted-runners) can be leveraged.
31+
GitHub sql-action requires that prior to running the action against Azure SQL Managed Instance, the workflow must have network access to the SQL instance. An overview of Azure SQL Managed Instance [networking](https://learn.microsoft.com/azure/azure-sql/managed-instance/connectivity-architecture-overview#high-level-connectivity-architecture) is available to assist in identifying the appropriate network access for your environment.
3232

33-
An overview of Azure SQL Managed Instance [networking](https://learn.microsoft.com/azure/azure-sql/managed-instance/connectivity-architecture-overview#high-level-connectivity-architecture) is available to assist in identifying the appropriate network access.
33+
Note that the public endpoint for Azure SQL Managed Instance utilizes a non-standard port (`Server=<mi_name>.public.<dns_zone>.database.windows.net,3342;Initial Catalog=<database>;...`), which should be included in the connection string. Azure SQL Managed Instance Public Endpoint requires enabling specific traffic in the network security group, detailed in the [public endpoint documentation](https://learn.microsoft.com/azure/azure-sql/managed-instance/public-endpoint-configure).
34+
35+
For network architectures where public access is not available, [self-hosted runners](https://docs.github.com/actions/hosting-your-own-runners/about-self-hosted-runners) can be leveraged to connect to the private endpoints.
36+
37+
> [!IMPORTANT]
38+
> A failure to connect to the Azure SQL Managed Instance will result in the action attempting to add a firewall rule as if the endpoint with Azure SQL Database, which will fail. The action will then fail with an error message indicating that the firewall rule could not be added. If the included error message does not provide enough context for you to further troubleshoot your connectivity, rerun the workflow with [debug logs enabled](https://docs.github.com/actions/managing-workflow-runs/enabling-debug-logging#enabling-runner-diagnostic-logging) to get more detailed logging.
39+
40+
41+
## SQL Server
42+
43+
GitHub sql-action requires that prior to running the action against SQL Server, the workflow must have network access to the SQL instance. For network architectures where public access is not available, [self-hosted runners](https://docs.github.com/actions/hosting-your-own-runners/about-self-hosted-runners) can be leveraged. The SQL Server instance may be hosted in Azure, other public clouds, or on-premises and connect to this action.
44+
45+
> [!IMPORTANT]
46+
> A failure to connect to the Azure SQL Managed Instance will result in the action attempting to add a firewall rule as if the endpoint with Azure SQL Database, which will fail. The action will then fail with an error message indicating that the firewall rule could not be added. If the included error message does not provide enough context for you to further troubleshoot your connectivity, rerun the workflow with [debug logs enabled](https://docs.github.com/actions/managing-workflow-runs/enabling-debug-logging#enabling-runner-diagnostic-logging) to get more detailed logging.
3447
3548
# 🔑 Authentication
3649

README.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Azure SQL Deploy
22

3-
This repository contains the sql-action GitHub Action for deploying changes to Azure SQL or SQL Server in a dacpac, SQL scripts, or an SDK-style SQL project. With the Azure SQL Action for GitHub, you can automate your workflow to deploy updates to Azure SQL or SQL Server.
3+
This repository contains the sql-action GitHub Action for deploying changes to Azure SQL Database, Azure SQL Managed Instance, or SQL Server in a dacpac, SQL scripts, or an SDK-style SQL project. With the Azure SQL Action for GitHub, you can automate your workflow to deploy updates to Azure SQL or SQL Server.
44

55

66

@@ -14,7 +14,7 @@ Looking to develop with SQL for free, locally and offline, before deploying with
1414
The definition of this GitHub Action is in [action.yml](https://github.com/Azure/sql-action/blob/master/action.yml). Learn more in the [user guide](#📓-user-guide).
1515

1616
```yaml
17-
- uses: azure/sql-action@v2.2
17+
- uses: azure/sql-action@v2.2.1
1818
with:
1919
# required, connection string incl the database and user authentication information
2020
connection-string:
@@ -48,7 +48,7 @@ jobs:
4848
runs-on: ubuntu-latest
4949
steps:
5050
- uses: actions/checkout@v3
51-
- uses: azure/sql-action@v2.2
51+
- uses: azure/sql-action@v2.2.1
5252
with:
5353
connection-string: ${{ secrets.AZURE_SQL_CONNECTION_STRING }}
5454
path: './Database.sqlproj'
@@ -71,7 +71,7 @@ jobs:
7171
- uses: azure/login@v1 # Azure login required to add a temporary firewall rule
7272
with:
7373
creds: ${{ secrets.AZURE_CREDENTIALS }}
74-
- uses: azure/sql-action@v2.2
74+
- uses: azure/sql-action@v2.2.1
7575
with:
7676
connection-string: ${{ secrets.AZURE_SQL_CONNECTION_STRING }}
7777
path: './sqlscripts/*.sql'
@@ -88,7 +88,7 @@ jobs:
8888
runs-on: windows-latest
8989
steps:
9090
- uses: actions/checkout@v3
91-
- uses: azure/sql-action@v2.2
91+
- uses: azure/sql-action@v2.2.1
9292
with:
9393
connection-string: ${{ secrets.AZURE_SQL_CONNECTION_STRING }}
9494
path: './Database.dacpac'
@@ -119,9 +119,14 @@ sql-action is supported on both Windows and Linux environments. The [default im
119119

120120
### Firewall Rules/Access
121121

122-
If you *can* use the option [Allow Azure Services and resources to access this server](https://docs.microsoft.com/en-us/azure/azure-sql/database/firewall-configure#connections-from-inside-azure), you are all set and you don't need to to anything else to allow GitHub Action to connect to your Azure SQL database.
122+
> [!NOTE]
123+
> This Firewall Rules section of the document is specific to Azure SQL Database. For Azure SQL Managed Instance and SQL Server it is recommended to review the [connection](CONNECTION.md) guide.
124+
125+
If you *can* use the option [Allow Azure Services and resources to access this server](https://docs.microsoft.com/en-us/azure/azure-sql/database/firewall-configure#connections-from-inside-azure) on Azure SQL Database, you are all set and you don't need to to anything else to allow GitHub Action to connect to your Azure SQL Database.
126+
127+
If you *cannot* use the aforementioned option on Azure SQL Database, the action can automatically add and remove a [SQL server firewall rule](https://docs.microsoft.com/azure/sql-database/sql-database-server-level-firewall-rule) specific to the GitHub Action runner's IP address. Without the firewall rule, the runner cannot communicate with Azure SQL Database. Read more about this in the [connection](CONNECTION.md) guide.
128+
123129

124-
If you *cannot* use the aforementioned option, the action can automatically add and remove a [SQL server firewall rule](https://docs.microsoft.com/azure/sql-database/sql-database-server-level-firewall-rule) specific to the GitHub Action runner's IP address. Without the firewall rule, the runner cannot communicate with Azure SQL Database. Read more about this in the [connection](CONNECTION.md) guide.
125130

126131

127132
#### Azure Credentials for Login (quickstart)
@@ -169,7 +174,7 @@ jobs:
169174
runs-on: ubuntu-latest
170175
steps:
171176
- uses: actions/checkout@v3
172-
- uses: azure/sql-action@v2.2
177+
- uses: azure/sql-action@v2.2.1
173178
with:
174179
connection-string: ${{ secrets.AZURE_SQL_CONNECTION_STRING }}
175180
path: './Database.sqlproj'
@@ -222,7 +227,7 @@ jobs:
222227
runs-on: ubuntu-latest
223228
steps:
224229
- uses: actions/checkout@v3
225-
- uses: azure/sql-action@v2.2
230+
- uses: azure/sql-action@v2.2.1
226231
with:
227232
connection-string: ${{ secrets.AZURE_SQL_CONNECTION_STRING }}
228233
path: './PreviousDatabase.dacpac'

0 commit comments

Comments
 (0)