File tree Expand file tree Collapse file tree 2 files changed +11
-9
lines changed Expand file tree Collapse file tree 2 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -3,9 +3,9 @@ FROM docker:24.0.7
33LABEL "maintainer" ="whoan <juaneabadie@gmail.com>"
44LABEL "repository" ="https://github.com/whoan/docker-build-with-cache-action"
55
6+ RUN apk add --no-cache bash grep jq yq aws-cli
7+
68COPY docker-build.sh /docker-build.sh
79COPY entrypoint.sh /entrypoint.sh
810
9- RUN apk add --no-cache bash grep jq yq
10-
1111ENTRYPOINT ["/entrypoint.sh" ]
Original file line number Diff line number Diff line change @@ -180,13 +180,12 @@ _push_image_stages() {
180180 docker push " $stage_image "
181181}
182182
183- _aws () {
184- docker run --rm \
185- --env AWS_ACCESS_KEY_ID=" $INPUT_USERNAME " \
186- --env AWS_SECRET_ACCESS_KEY=" $INPUT_PASSWORD " \
187- --env AWS_SESSION_TOKEN=" $INPUT_SESSION " \
188- amazon/aws-cli:2.1.14 --region " $( _get_aws_region) " " $@ "
189- }
183+ _aws () (
184+ export AWS_ACCESS_KEY_ID
185+ export AWS_SECRET_ACCESS_KEY
186+ export AWS_SESSION_TOKEN
187+ aws --region " $( _get_aws_region) " " $@ "
188+ )
190189
191190_aws_get_public_ecr_registry_name () {
192191 _aws ecr-public describe-registries --output=text --query ' registries[0].aliases[0].name'
@@ -294,6 +293,9 @@ init_variables() {
294293 if [ -z " $INPUT_SESSION " ]; then
295294 INPUT_SESSION=$AWS_SESSION_TOKEN
296295 fi
296+ AWS_ACCESS_KEY_ID=$INPUT_USERNAME
297+ AWS_SECRET_ACCESS_KEY=$INPUT_PASSWORD
298+ AWS_SESSION_TOKEN=$INPUT_SESSION
297299 fi
298300
299301 # split tags (to allow multiple comma-separated tags)
You can’t perform that action at this time.
0 commit comments