From d3d8a78ee3165704929cdc3ffb9bbfb545880edc Mon Sep 17 00:00:00 2001 From: Nicolas Giard Date: Fri, 18 Jan 2019 22:47:17 -0500 Subject: [PATCH] misc: publish to github test --- dev/build/Dockerfile | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/dev/build/Dockerfile b/dev/build/Dockerfile index fc93cce7..b121263b 100644 --- a/dev/build/Dockerfile +++ b/dev/build/Dockerfile @@ -22,6 +22,37 @@ RUN yarn build RUN rm -rf /wiki/node_modules RUN yarn --production +# ========================= +# --- Publish to GitHub --- +# ========================= + +FROM alpine AS publishing + +RUN apk --update add git jq openssh hub tar && \ + rm -rf /var/cache/apk/* + +WORKDIR /wiki + +COPY --from=assets /wiki/assets ./assets +COPY --from=assets /wiki/node_modules ./node_modules +COPY ./server ./server +COPY --from=assets /wiki/server/views ./server/views +COPY ./config.sample.yml ./config.sample.yml +COPY ./package.json ./package.json +COPY ./LICENSE ./LICENSE + +RUN BUILDNUM=$(jq -r '.version' package.json) + +WORKDIR / + +RUN tar -czf wiki-js.tar.gz /wiki +RUN mv wiki-js.tar.gz /wiki + +WORKDIR /wiki + +RUN hub init -g "Requarks/wiki" +RUN hub create -p -a wiki-js.tar.gz -m "See [CHANGELOG](https://github.com/Requarks/wiki/blob/master/CHANGELOG.md) for release notes" -t $CF_REVISION $BUILDNUM + # =============== # --- Release --- # ===============