From 3c092dd9a553ccbb945ac1b568415f9a657a6dd0 Mon Sep 17 00:00:00 2001 From: George Taylor Date: Mon, 21 Oct 2024 11:02:22 +0100 Subject: [PATCH] Update migrate-s3.yaml --- .github/workflows/migrate-s3.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/migrate-s3.yaml b/.github/workflows/migrate-s3.yaml index 2cf3a61..9297039 100644 --- a/.github/workflows/migrate-s3.yaml +++ b/.github/workflows/migrate-s3.yaml @@ -20,8 +20,8 @@ permissions: contents: read jobs: - refresh-s3: - name: Refresh S3 + migrate-s3: + name: Migrate S3 runs-on: ubuntu-22.04 environment: name: ${{ github.event.inputs.environment }} @@ -71,7 +71,7 @@ jobs: for prefix in $cleaned_prefixes; do DIR=$(kubectl exec $SERVICE_POD_NAME -- aws s3api list-objects-v2 --bucket $SRC_BUCKET --prefix "$prefix" --delimiter '/' --query 'CommonPrefixes[*].Prefix' --output text) if [ -n "$DIR" ]; then - DIR=$(echo $DIR | tr -s '[:space:]' ',') + DIR=$(echo $DIR | tr -s '[:space:]' ',' | sed 's/[,/]*$//') DIRS="${DIRS}${DIR}," fi done