Closed JoshFieldstad closed 1 year ago
When sql-action is invoked like below:
- name: Generate Drift Report uses: azure/sql-action@v2 with: connection-string: ${{ secrets.BAR_CONNECTIONSTRING }} path: foo\bar.dacpac action: 'DriftReport' arguments: "/OutputPath:'${{ github.workspace }}/driftreport'"
The below error is given:
'SourceFile' is not a valid argument for the 'DriftReport' action.
To resolve this, I attempted to remove the path parameter from the azure/sql-action invocation. This throws the below error.
path
Error: Input required and not supplied: path
Microsoft documentation does not contain a /SourceFile: parameter for the sql package driftreport action. https://learn.microsoft.com/en-us/sql/tools/sqlpackage/sqlpackage-deploy-drift-report?view=sql-server-ver16#driftreport-action-parameters
/SourceFile:
It looks like this could be resolved by modifying this case statement to only add /SourceFile: for Publish, Script, and Deploy report. https://github.com/Azure/sql-action/blob/master/src/AzureSqlAction.ts#:~:text=case%20SqlPackageAction.,break%3B
I created a PR to show my thoughts on a fix here: https://github.com/Azure/sql-action/pull/167
thanks @JoshFieldstad - now shipped in https://github.com/Azure/sql-action/releases/tag/v2.1
Problem description/replication steps
When sql-action is invoked like below:
The below error is given:
To resolve this, I attempted to remove the
path
parameter from the azure/sql-action invocation. This throws the below error.Microsoft documentation does not contain a
/SourceFile:
parameter for the sql package driftreport action. https://learn.microsoft.com/en-us/sql/tools/sqlpackage/sqlpackage-deploy-drift-report?view=sql-server-ver16#driftreport-action-parametersIt looks like this could be resolved by modifying this case statement to only add
/SourceFile:
for Publish, Script, and Deploy report. https://github.com/Azure/sql-action/blob/master/src/AzureSqlAction.ts#:~:text=case%20SqlPackageAction.,break%3B