File tree Expand file tree Collapse file tree 3 files changed +20
-3
lines changed
Expand file tree Collapse file tree 3 files changed +20
-3
lines changed Original file line number Diff line number Diff line change 2828 --https-only \
2929 --permissions acdlpruw \
3030 --resource-types sco \
31- --services f | cut -d' "' -f2
31+ --services fb | cut -d' "' -f2
3232)
3333
3434authorized_destination=" $destination ?$sas "
Original file line number Diff line number Diff line change 11name : Run azcopy
2- description : Copy files with azcopy
2+ description : Copy/Sync files with azcopy
33
44branding :
55 icon : ' battery-charging'
@@ -14,13 +14,25 @@ inputs:
1414 required : true
1515 description : Destination directory or SAS token
1616
17+ mode :
18+ required : false
19+ default : " copy"
20+ description : azcopy action mode (copy or sync)
21+
1722 put_md5 :
1823 required : false
1924 default : " true"
2025 description : |
2126 Create an MD5 hash of each file, and save the hash as the Content-MD5 property
2227 of the destination blob or file. (By default the hash is NOT created.) Only available when uploading.
2328
29+ delete_destination :
30+ required : false
31+ default : " false"
32+ description : |
33+ When mode="sync", if the 'delete_destination' flag is set to true, then sync will delete files and blobs
34+ at the destination that aren't present at the source.
35+
2436runs :
2537 using : " composite"
2638 steps :
3042 env :
3143 SOURCE : ${{ inputs.source }}
3244 TARGET : ${{ inputs.target }}
45+ MODE : ${{ inputs.mode }}
3346 PUT_MD5 : ${{ inputs.put_md5 }}
47+ DELETE_DESTINATION : ${{ inputs.delete_destination }}
Original file line number Diff line number Diff line change @@ -21,4 +21,7 @@ AZCOPY_OPTIONS=("--recursive" "--overwrite" "true")
2121if [[ " $( echo " $PUT_MD5 " | tr ' [:upper:]' ' [:lower:]' ) " == ' true' ]]; then
2222 AZCOPY_OPTIONS+=(" --put-md5" )
2323fi ;
24- ./azcopy copy " $SOURCE " " $TARGET " " ${AZCOPY_OPTIONS[@]} "
24+ if [[ " $( echo " $DELETE_DESTINATION " | tr ' [:upper:]' ' [:lower:]' ) " == ' true' ]]; then
25+ AZCOPY_OPTIONS+=(" --delete-destination" " true" )
26+ fi ;
27+ ./azcopy " $MODE " " $SOURCE " " $TARGET " " ${AZCOPY_OPTIONS[@]} "
You can’t perform that action at this time.
0 commit comments