Skip to content

Commit

Permalink
use sql action
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard87 committed Feb 6, 2024
1 parent ca5c309 commit 12fd2df
Showing 1 changed file with 24 additions and 38 deletions.
62 changes: 24 additions & 38 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,51 +61,37 @@ jobs:
Encrypt=True;
TrustServerCertificate=False;
Connection Timeout=30;
SQLCMDSERVER: sql-radix-vulnerability-scan-dev.database.windows.net
steps:

- uses: actions/checkout@v4

- uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Install sqlcmd # (binary is named `modern`)
run: go install github.com/microsoft/go-sqlcmd/cmd/modern@latest

- uses: azure/login@v1
with:
client-id: "9e11916f-356b-4fb1-94ae-f06cc8e473b8"
tenant-id: "3aa4a235-b6e2-48d5-9195-7fcf05b459b0"
allow-no-subscriptions: true

- run: >-
modern
-S sql-radix-vulnerability-scan-dev.database.windows.net
--authentication-method ActiveDirectoryDefault
-i ./azure-infrastructure/sql-scripts/predeploy.sql
# - uses: azure/sql-action@v2.2.1
# with:
# connection-string: ${{env.connection}}
# path: './azure-infrastructure/sql-scripts/predeploy.sql'
# - uses: azure/sql-action@v2.2.1
# with:
# connetion-string: ${{env.connection}}
# path: ./azure-infrastructure/sql-scripts/roles.sql
# - uses: azure/sql-action@v2.2.1
# with:
# connetion-string: ${{env.connection}}
# path: ./azure-infrastructure/sql-scripts/types.sql
# - uses: azure/sql-action@v2.2.1
# with:
# connetion-string: ${{env.connection}}
# path: ./azure-infrastructure/sql-scripts/tables.sql
# - uses: azure/sql-action@v2.2.1
# with:
# connetion-string: ${{env.connection}}
# path: ./azure-infrastructure/sql-scripts/views.sql
# - uses: azure/sql-action@v2.2.1
# with:
# connetion-string: ${{env.connection}}
# path: ./azure-infrastructure/sql-scripts/procedures.sql
- uses: azure/sql-action@v2.2.1
with:
connection-string: ${{env.connection}}
path: './azure-infrastructure/sql-scripts/predeploy.sql'
- uses: azure/sql-action@v2.2.1
with:
connetion-string: ${{env.connection}}
path: './azure-infrastructure/sql-scripts/roles.sql'
- uses: azure/sql-action@v2.2.1
with:
connetion-string: ${{env.connection}}
path: './azure-infrastructure/sql-scripts/types.sql'
- uses: azure/sql-action@v2.2.1
with:
connetion-string: ${{env.connection}}
path: './azure-infrastructure/sql-scripts/tables.sql'
- uses: azure/sql-action@v2.2.1
with:
connetion-string: ${{env.connection}}
path: './azure-infrastructure/sql-scripts/views.sql'
- uses: azure/sql-action@v2.2.1
with:
connetion-string: ${{env.connection}}
path: './azure-infrastructure/sql-scripts/procedures.sql'

0 comments on commit 12fd2df

Please sign in to comment.