Skip to content

Unable to use it with on-prem SQL Server #111

@galvesribeiro

Description

@galvesribeiro

Hello!

I'm trying to use this action to deploy some SQL Script to a SQL Container which is spin up as a services container at build time so we can validate the build with unit tests on Github Enterprise on a self-hosted GitHub Actions agent.

The SQL container is defined like this:

    services:
      sql:
        image: mcr.microsoft.com/mssql/server:2022-latest
        env:
          ACCEPT_EULA: Y
          SA_PASSWORD: yourStrong(!)Password
        ports:
          - 1433

The actions setup is as follow:

- uses: azure/[email protected]
        with:        
          connection-string: ${{ env.SQL_CS }}
          sql-file: 'src/*.sql'
        env:
          SQL_CS: "Server=localhost,${{ job.services.sql.ports[1433] }};Initial Catalog=MyDB;User Id=sa;Password=yourStrong(!)Password"

The error is shown like this:

image

Am I missing something? The readme says it is supposed to work with SQL Server, not just with Azure SQL. Can someone shed a light on it?

Thanks!

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions