diff --git a/Dockerfile b/Dockerfile index ba99dec..40e5908 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ FROM node:lts-alpine3.9 -RUN apk update && apk upgrade && apk add --no-cache bash git openssh +RUN apk update && apk upgrade && apk add --no-cache bash git openssh optipng COPY entrypoint.sh /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"] diff --git a/action.yml b/action.yml index be69c5c..245af9f 100644 --- a/action.yml +++ b/action.yml @@ -1,5 +1,5 @@ -name: Prettier Action -description: Automatically runs prettier on all your changes. +name: Crush Action +description: Losslessly reduces file size for PNGs author: Conrad Großer @@ -7,7 +7,7 @@ inputs: commit_message: description: Commit message required: false - default: 'Prettified Code!' + default: 'Optimised your images!' commit_options: description: Commit options required: false diff --git a/entrypoint.sh b/entrypoint.sh index ad673da..d9eb7f7 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -36,7 +36,7 @@ _git_push() { } # PROGRAM -# TODO: Add actual commands for compressing +find -type f -name "*.png" -exec optipng -nc -nb -o7 {} \; # To keep runtime good, just continue if something was changed if _git_changed;