### At first perform source build ### FROM starwarsfan/cmake-builder-debian:1.0 as build MAINTAINER Yves Schumann COPY /demo-app RUN mkdir /demo-app/build \ && cd /demo-app/build \ && cmake .. \ && cmake --build . RUN echo "Build is finished now, just execute result right here to show something on the log:" \ && /demo-app/build/hello-world ### Now upload binaries to GitHub ### FROM starwarsfan/github-release-uploader:1.0 MAINTAINER Yves Schumann ARG GITHUB_TOKEN=1234567 ARG RELEASE=latest ARG REPOSITORY=cmake build test ARG GIT_COMMIT=unknown ARG REPLACE_EXISTING_ARCHIVE='' ENV ARCHIVE=cmake-buildtest-${RELEASE}-${GIT_COMMIT}-Debian.tgz RUN mkdir -p /filesToUpload/usr/local/bin # Maybe copy more from the builder... COPY --from=build /demo-app/build/hello-world /filesToUpload/usr/local/bin/hello-world RUN cd /filesToUpload \ && tar czf ${ARCHIVE} . \ && github-release upload \ --user starwarsfan \ --security-token "${GITHUB_TOKEN}" \ --repo "${REPOSITORY}" \ --tag "${RELEASE}" \ --name "${ARCHIVE}" \ --file "/filesToUpload/${ARCHIVE}" \ ${REPLACE_EXISTING_ARCHIVE} \ && export GITHUB_TOKEN=---