[GHA] GCP Backup upload testing

This commit is contained in:
aboyko
2024-07-16 13:23:00 -04:00
parent 3ff0b11fc7
commit 21fa3ef658
2 changed files with 63 additions and 0 deletions

14
.github/scripts/copy-from-s3-to-gcp.sh vendored Executable file
View File

@@ -0,0 +1,14 @@
s3_url=$1
gcp_url=$2
# Process s3_url remove trailing / and get the last segment without the trailing /
file_name=${s3_url%/}
file_name=${file_name##*/}
# Download from S3 then upload to GCP
aws s3 cp $s3_url . --recursive --no-progress
echo "-------"
ls
echo "-------"
gcp storage cp $gcp_url ./$file_name --recursive
rm -rf $file_name