Skip to content

Commit

Permalink
fix: remove docker push
Browse files Browse the repository at this point in the history
  • Loading branch information
Diego Santos committed Jan 26, 2024
1 parent 8088bc0 commit 6319740
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 17 deletions.
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,4 @@ COPY src/* /bin/
RUN chmod +x /bin/_utils.sh && \
chmod +x /bin/push

# CMD ["/bin/push"]
CMD ["/bin/sh"]
CMD ["/bin/push"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This action builds, tags, and pushes a Docker image to AWS ECR.
| IMAGE_TAG | Docker Image Tag (default: random hash) |
| IMAGE_TAG_DEFAULT | Docker Image Tag Default (default: latest) |
| PATH_DOCKERFILE | Dockerfile Path (default: ./Dockerfile) |
| DOCKER_ARCHITECTURE | Docker Architecture (default: amd64/arm64) |
| DOCKER_ARCHITECTURE | Docker Architecture (default: linux/amd64) |

## Example Usage

Expand Down
Empty file modified src/_utils.sh
100644 → 100755
Empty file.
16 changes: 2 additions & 14 deletions src/push
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ if [ -z "${IMAGE_REPOSITORY_URL}" ]; then
fi

if [ -z "${DOCKER_ARCHITECTURE}" ]; then
log_warning "DOCKER_ARCHITECTURE is empty. Using default value: linux/amd64,linux/arm64"
DOCKER_ARCHITECTURE="${DOCKER_ARCHITECTURE:-linux/amd64,linux/arm64}"
log_warning "DOCKER_ARCHITECTURE is empty. Using default value: linux/amd64"
DOCKER_ARCHITECTURE="${DOCKER_ARCHITECTURE:-linux/amd64}"
fi

IMAGE_TAG="${IMAGE_TAG:-$(openssl rand -hex 3)}"
Expand Down Expand Up @@ -61,17 +61,5 @@ then
throw "Error on build docker image"
fi

log_info "Pushing docker image with tag $IMAGE_TAG"
if ! docker push $DOCKER_IMAGE
then
throw "Error on push docker image"
fi

log_info "Pushing docker image with tag $IMAGE_TAG_DEFAULT"
if ! docker push $DOCKER_IMAGE_DEFAULT
then
throw "Error on push docker image"
fi

log_success "Docker image pushed"
echo $DOCKER_IMAGE

0 comments on commit 6319740

Please sign in to comment.