Skip to content

Commit eea144a

Browse files
updated clone replacements
1 parent 30288ea commit eea144a

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

tasks/database-clone/action.yml

+12-3
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,23 @@ inputs:
3131
storage-integration-name:
3232
description: The Storage Integration Name
3333
required: false
34+
storage-account-name:
35+
description: The Storage Account Name for Storeage Integration URL
36+
required: false
37+
database-comment:
38+
description: The Comment to add to the clone database
39+
required: false
3440

3541
runs:
3642
using: "composite"
3743
steps:
38-
- name: Find and replace target & source database name
44+
- name: Find and replace the placeholders
3945
run: |
40-
sed -i 's/TARGET_DATABASE_NAME/${{ inputs.target-database }}/g' database-clone.sql
41-
sed -i 's/SOURCE_DATABASE_NAME/${{ inputs.source-database }}/g' database-clone.sql
46+
sed -i 's/<<TARGET_DATABASE_NAME>>/${{ inputs.target-database }}/g' database-clone.sql
47+
sed -i 's/<<SOURCE_DATABASE_NAME>>/${{ inputs.source-database }}/g' database-clone.sql
48+
sed -i 's/<<CLONE_DATABASE_COMMENT>>/${{ inputs.source-database }}/g' database-clone.sql
49+
sed -i 's/<<STORAGE_INTEGRATION_NAME>>/${{ inputs.storage-integration-name }}/g' database-clone.sql
50+
sed -i 's/<<STORAGE_ACCOUNT_NAME>>/${{ inputs.storage-account-name }}/g' database-clone.sql
4251
shell: pwsh
4352
working-directory: ${{ inputs.working-directory }}
4453
- name: Download SnowSQL

0 commit comments

Comments
 (0)