Skip to content

Commit 46cf3ed

Browse files
Use AWS CLI v2 and Python 3.11
1 parent 7ed8b11 commit 46cf3ed

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

Dockerfile

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
1-
FROM python:3.8-alpine
1+
FROM amazon/aws-cli:2.17.7
22

33
LABEL "com.github.actions.name"="S3 Sync"
44
LABEL "com.github.actions.description"="Sync a directory to an AWS S3 repository"
55
LABEL "com.github.actions.icon"="refresh-cw"
66
LABEL "com.github.actions.color"="green"
77

8-
LABEL version="0.5.1"
9-
LABEL repository="https://github.com/jakejarvis/s3-sync-action"
10-
LABEL homepage="https://jarv.is/"
11-
LABEL maintainer="Jake Jarvis <jake@jarv.is>"
8+
LABEL org.opencontainers.image.version="0.6.0"
9+
LABEL org.opencontainers.image.source="https://github.com/henriquemattos/s3-sync-action"
10+
LABEL org.opencontainers.image.url="https://www.linkedin.com/in/henriquemattos"
11+
LABEL org.opencontainers.image.authors="Jake Jarvis <jake@jarv.is>, Henrique Mattos <hey@henriquemattos.eu>"
1212

1313
# https://github.com/aws/aws-cli/blob/master/CHANGELOG.rst
14-
ENV AWSCLI_VERSION='1.18.14'
15-
16-
RUN pip install --quiet --no-cache-dir awscli==${AWSCLI_VERSION}
14+
ENV AWSCLI_VERSION='2.17.7'
1715

1816
ADD entrypoint.sh /entrypoint.sh
1917
ENTRYPOINT ["/entrypoint.sh"]

entrypoint.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,9 @@ EOF
3939

4040
# Sync using our dedicated profile and suppress verbose messages.
4141
# All other flags are optional via the `args:` directive.
42-
sh -c "aws s3 sync ${SOURCE_DIR:-.} s3://${AWS_S3_BUCKET}/${DEST_DIR} \
42+
aws s3 sync ${SOURCE_DIR:-.} s3://${AWS_S3_BUCKET}/${DEST_DIR} \
4343
--profile s3-sync-action \
44-
--no-progress \
45-
${ENDPOINT_APPEND} $*"
44+
${ENDPOINT_APPEND} $*
4645

4746
# Clear out credentials after we're done.
4847
# We need to re-run `aws configure` with bogus input instead of

0 commit comments

Comments
 (0)