Skip to content

Commit dae6275

Browse files
authored
release prep (#234)
1 parent 048d916 commit dae6275

3 files changed

Lines changed: 18 additions & 10 deletions

File tree

CONNECTION.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ GitHub sql-action access is coupled with two concepts necessary for the action t
77

88
# 🔌 Network connectivity
99

10+
> [!TIP]
11+
> This action checks if the runner is able to connect to the database before executing the scripts or deployment to determine whether a firewall rule should be added. In some environments this can cause the action to fail so the connectivity check can be skipped by setting the input `skip-firewall-check` to `true`.
12+
1013
## Azure SQL Database
1114

1215
If you *can* use the option [Allow Azure Services and resources to access this server](https://docs.microsoft.com/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.

README.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -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.1
17+
- uses: azure/sql-action@v2.3
1818
with:
1919
# required, connection string incl the database and user authentication information
2020
connection-string:
@@ -29,6 +29,9 @@ The definition of this GitHub Action is in [action.yml](https://github.com/Azure
2929
# optional additional sqlpackage or go-sqlcmd arguments
3030
arguments:
3131

32+
# optional SqlPackage executable location, overrides default locations
33+
sqlpackage-path:
34+
3235
# optional additional dotnet build options when building a database project file
3336
build-arguments:
3437

@@ -51,7 +54,7 @@ jobs:
5154
runs-on: ubuntu-latest
5255
steps:
5356
- uses: actions/checkout@v3
54-
- uses: azure/sql-action@v2.2.1
57+
- uses: azure/sql-action@v2.3
5558
with:
5659
connection-string: ${{ secrets.AZURE_SQL_CONNECTION_STRING }}
5760
path: './Database.sqlproj'
@@ -74,7 +77,7 @@ jobs:
7477
- uses: azure/login@v1 # Azure login required to add a temporary firewall rule
7578
with:
7679
creds: ${{ secrets.AZURE_CREDENTIALS }}
77-
- uses: azure/sql-action@v2.2.1
80+
- uses: azure/sql-action@v2.3
7881
with:
7982
connection-string: ${{ secrets.AZURE_SQL_CONNECTION_STRING }}
8083
path: './sqlscripts/*.sql'
@@ -91,7 +94,7 @@ jobs:
9194
runs-on: windows-latest
9295
steps:
9396
- uses: actions/checkout@v3
94-
- uses: azure/sql-action@v2.2.1
97+
- uses: azure/sql-action@v2.3
9598
with:
9699
connection-string: ${{ secrets.AZURE_SQL_CONNECTION_STRING }}
97100
path: './Database.dacpac'
@@ -120,18 +123,20 @@ sql-action is supported on both Windows and Linux environments. The [default im
120123
- sqlpackage (for sqlproj or dacpac deployment)
121124
- dotnet (for sqlproj build)
122125

126+
On Windows, sql-action attempts to locate SqlPackage as a dotnet tool, in the [default MSI install location](https://learn.microsoft.com/sql/tools/sqlpackage/sqlpackage-download#windows-net-framework) `C:\Program Files\Microsoft SQL Server\160\DAC\bin`, and as a last resort for versions installed by Visual Studio. On Linux, sql-action attempts to locate SqlPackage as a dotnet tool before falling back to PATH. In both operating systems, the input `sqlpackage-path` can be used to override the default locations. For custom images installing SqlPackage as a [dotnet tool](https://learn.microsoft.com/sql/tools/sqlpackage/sqlpackage-download#installation-cross-platform) is recommended.
127+
128+
sql-action installs [go-sqlcmd](https://github.com/microsoft/go-sqlcmd) at runtime for SQL script deployments.
129+
123130
### Firewall Rules/Access
124131

125132
> [!NOTE]
126133
> 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.
127134

128-
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.
135+
If you *can* use the option [Allow Azure Services and resources to access this server](https://docs.microsoft.com/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.
129136

130137
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.
131138

132139

133-
134-
135140
#### Azure Credentials for Login (quickstart)
136141

137142
**To enable the action to automatically add/remove a firewall rule, add an [`Azure/login`](https://github.com/Azure/login) step before the `sql-action` step.** Also, the service principal used in the Azure login action needs to have elevated permissions, i.e. membership in SQL Security Manager RBAC role, or a similarly high permission in the database to create the firewall rule. Read more about this and other authentication methods in the [connection](CONNECTION.md) guide.
@@ -177,7 +182,7 @@ jobs:
177182
runs-on: ubuntu-latest
178183
steps:
179184
- uses: actions/checkout@v3
180-
- uses: azure/sql-action@v2.2.1
185+
- uses: azure/sql-action@v2.3
181186
with:
182187
connection-string: ${{ secrets.AZURE_SQL_CONNECTION_STRING }}
183188
path: './Database.sqlproj'
@@ -230,7 +235,7 @@ jobs:
230235
runs-on: ubuntu-latest
231236
steps:
232237
- uses: actions/checkout@v3
233-
- uses: azure/sql-action@v2.2.1
238+
- uses: azure/sql-action@v2.3
234239
with:
235240
connection-string: ${{ secrets.AZURE_SQL_CONNECTION_STRING }}
236241
path: './PreviousDatabase.dacpac'

lib/main.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)