diff --git a/.github/actions/choco/Dockerfile b/.github/actions/choco/Dockerfile index 5006ecf..1661e9d 100644 --- a/.github/actions/choco/Dockerfile +++ b/.github/actions/choco/Dockerfile @@ -1,36 +1,19 @@ -# choco supports only Mono 5.20.x -# https://github.com/chocolatey/choco#prerequisites -FROM mono:5.20 as builder -# 0.10.15 with newer Mono is failing as it's dependent on Mono Profile 4.0 which has been deprecated -# http://www.mono-project.com/docs/about-mono/releases/4.0.0/#dropped-support-for-old-frameworks -# Alternative to consider, use git repository and reset to specific tag/hash -ARG CHOCOVERSION=0.10.16-beta - -ENV DEBIAN_FRONTEND=noninteractive -RUN apt-get update && apt-get install -y wget tar gzip - -WORKDIR /usr/local/src -RUN wget "https://github.com/chocolatey/choco/archive/${CHOCOVERSION}.tar.gz" -RUN tar -xzf "${CHOCOVERSION}.tar.gz" -RUN mv "choco-${CHOCOVERSION}" choco - -WORKDIR /usr/local/src/choco -RUN chmod +x build.sh zip.sh -RUN ./build.sh -v - FROM alpine:latest -COPY --from=builder /usr/local/src/choco/build_output/chocolatey /opt/chocolatey +ARG CHOCOVERSION=0.11.3 -RUN apk add --no-cache bash -RUN apk --update --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing add mono-dev \ - && apk --update --no-cache add -t build-dependencies ca-certificates \ +RUN apk add --no-cache bash ca-certificates \ + && apk --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing add mono-dev \ && cert-sync /etc/ssl/certs/ca-certificates.crt \ + && wget "https://github.com/chocolatey/choco/archive/${CHOCOVERSION}.tar.gz" \ + && tar -xzf "${CHOCOVERSION}.tar.gz" \ + && mv "choco-${CHOCOVERSION}" /opt/chocolatey \ + && chmod +x build.sh zip.sh \ + && ./build.sh -v \ && ln -sf /opt /opt/chocolatey/opt \ && mkdir -p /opt/chocolatey/lib \ - && apk del build-dependencies \ + && apk del ca-certificates \ && rm -rf /var/cache/apk/* - COPY entrypoint.sh /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"] diff --git a/.github/actions/choco/entrypoint.sh b/.github/actions/choco/entrypoint.sh index 7048395..83e2571 100755 --- a/.github/actions/choco/entrypoint.sh +++ b/.github/actions/choco/entrypoint.sh @@ -3,7 +3,7 @@ set -e function choco { - mono /opt/chocolatey/choco.exe "$@" --allow-unofficial --nocolor + mono /opt/chocolatey/code_drop/chocolatey/choco.exe "$@" --allow-unofficial --nocolor } function get_version {