Skip to content

Commit

Permalink
altered how endpoints are appended
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielSinclair authored and jakejarvis committed Oct 17, 2019
1 parent 14536a7 commit 36db6fa
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,14 @@ if [ -z "$AWS_REGION" ]; then
exit 1
fi

# Default to CLI defined AWS endpoint
ENDPOINT_APPEND=""
if [ "$AWS_S3_ENDPOINT" ]; then
ENDPOINT_APPEND="--endpoint-url $AWS_S3_ENDPOINT"
fi

# Default to syncing entire repo if SOURCE_DIR not set.
SOURCE_DIR=${SOURCE_DIR:-.}
ENDPOINT_APPEND=${"--endpoint-url $AWS_S3_ENDPOINT":-}

# Create a dedicated profile for this action to avoid
# conflicts with other actions.
Expand All @@ -39,6 +44,5 @@ EOF
# Use our dedicated profile and suppress verbose messages.
# All other flags are optional via `args:` directive.
sh -c "aws s3 sync ${SOURCE_DIR} s3://${AWS_S3_BUCKET}/${DEST_DIR} \
--profile s3-sync-action \
${ENDPOINT_APPEND} \
--profile s3-sync-action ${ENDPOINT_APPEND} \
--no-progress $*"

0 comments on commit 36db6fa

Please sign in to comment.