diff --git a/Dockerfile b/Dockerfile index 793e60f..1c4995c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,16 +4,15 @@ LABEL "repository"="https://github.com/ergebnis/composer-normalize-action" LABEL "homepage"="https://github.com/ergebnis/composer-normalize" LABEL "maintainer"="Andreas Möller " -COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer - -ENV COMPOSER_ALLOW_SUPERUSER=1 - -RUN composer global require ergebnis/composer-normalize:2.2.0 --no-interaction --no-progress --no-suggest - -RUN mkdir /app - -WORKDIR /app - -ENTRYPOINT ["/usr/local/bin/composer", "normalize"] - -CMD ["--dry-run"] +ENV VERSION=2.5.1 + +RUN apk add --no-cache gnupg \ + && cd /opt/ \ + && wget https://github.com/ergebnis/composer-normalize/releases/download/${VERSION}/composer-normalize.phar.asc \ + && wget https://github.com/ergebnis/composer-normalize/releases/download/${VERSION}/composer-normalize.phar \ + && gpg --yes --keyserver pool.sks-keyservers.net --recv-keys 0FDE18AE1D09E19F60F6B1CBC00543248C87FB13 \ + && gpg --yes --verify composer-normalize.phar.asc composer-normalize.phar \ + && chmod +x composer-normalize.phar \ + && mv composer-normalize.phar /usr/bin/composer-normalize + +ENTRYPOINT ["/usr/bin/composer-normalize"] diff --git a/Makefile b/Makefile index b00c8ac..01ca640 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ .PHONY: docker help it +COMPOSER_NORMALIZE_VERSION:=2.5.1 DOCKER_IMAGE:=ergebnis/composer-normalize-action it: docker ## Runs the docker target