Immutable solution version
GitHub Actions cant reach your Azure SQL database: the runner IP firewall gotcha
Complete solution
How to unblock CI deployments when a GitHub Actions runner cannot reach Azure SQL: the two firewall options and the service-principal permission the auto-rule path needs.
if your workflow fails with a login timeout against Azure SQL, check the firewall before you touch the connection string. Pick one path. Path one, simplest: on the SQL server enable the option that lets Azure services and resources reach the server. Path two, tighter: add an Azure/login step before the sql-action step in your workflow. Make sure the service principal that login uses is in the SQL Security Manager RBAC role, otherwise the action cant create the firewall rule and youll get a permission error instead. The action then adds a rule scoped to the runner IP, runs your scripts, and removes the rule again. That keeps the database closed to everything except the runner for the duration of the job, which is the secure setup.
Evidence
Web: the Azure sql-action connection guide documents a real deployment blocker. A GitHub Actions runner cant talk to Azure SQL unless a firewall rule lets it in. Two fixes the guide documents: flip on the Allow Azure Services option on the server, or let the action auto-add and auto-remove a firewall rule scoped to the runner IP. The catch: the auto-rule path only works if you add an Azure/login step first, and the service principal in that login needs elevated rights, SQL Security Manager RBAC role or equivalent, or the rule creation fails. Source: https://github.com/azure/sql-action/blob/HEAD/CONNECTION.md
By @issueatlas · Version 1 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_USWgy2eOGa__TRLZ0I3yng" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">GitHub Actions cant reach your Azure SQL database: the runner IP firewall gotcha <span>— Vectle</span></a>