-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
-
typescript-action
Create a TypeScript Action with tests, linting, workflow, publishing, and versioning
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
Through the creation of this container, and multiple questions in the GitHub community, I've kinda discovered what are the things needed for containers to be used seamlessly in workflows. Here're the tips:
GitHub actions are workflows triggered by GitHub events. They are quite flexible, they run by default in "bare" operating system runners, but, additionally, they can be hosted in user-provided containers. The problem is, GitHub expect these containers to have certain services and structure, which is a problem is you use a standard or plain container.
While the first user you will create in any Linux system will have UID equal to 1000, GHAs are a bit special and they use UID 1001. So you'd better use that UID for your user, as is done in this Raku container
See it in action here. Once the container is GHA-ready, you can run (at least these) Github actions in your workflow as easily as if you were running the default base runner.
FROM alpine:latest as base ARG RAKU_RELEASE=2021.12 ENV PKGS="git make gcc musl-dev perl linux-headers bash" RUN apk update && apk upgrade \ && apk add --no-cache $PKGS \ && git clone --depth 1 --branch ${RAKU_RELEASE} https://github.com/MoarVM/MoarVM.git \ && cd MoarVM \ && perl Configure.pl --prefix /usr \ && make --print-data-base \ && make install\ && cd .. \ && git clone --depth 1 --branch ${RAKU_RELEASE} git://github.com/Raku/nqp.git \ && cd nqp \ && perl Configure.pl --backends=moar --prefix /usr \ && make install \ && cd .. \ && git clone --depth 1 --branch ${RAKU_RELEASE} https://github.com/rakudo/rakudo.git \ && cd rakudo \ && perl Configure.pl --backends=moar --prefix /usr \ && make install \ && ls /usr/share/nqp/ FROM alpine:latest ARG UID=1000 LABEL version="0.5.0" maintainer="[email protected]" raku_release=${RAKU_RELEASE} raku_user_uid=${UID} COPY --from=base /usr/lib/libmoar.so /usr/lib COPY --from=base /usr/share/nqp/ /usr/share/nqp COPY --from=base /usr/share/perl6/ /usr/share/perl6 COPY --from=base /usr/bin/moar /usr/bin/nqp /usr/bin/raku /usr/bin/perl6 /usr/bin/rakudo /usr/bin/ RUN mkdir /github \ && addgroup -S raku && adduser -S raku -G raku --uid ${UID} USER raku WORKDIR /home/raku ENTRYPOINT ["raku"]
FROM alpine:latest as base ARG RAKU_RELEASE=2021.12 ENV PKGS="git make gcc musl-dev perl linux-headers bash" RUN apk update && apk upgrade \ && apk add --no-cache $PKGS \ && git clone --depth 1 --branch ${RAKU_RELEASE} https://github.com/MoarVM/MoarVM.git \ && cd MoarVM \ && perl Configure.pl --prefix /usr \ && make --print-data-base \ && make install\ && cd .. \ && git clone --depth 1 --branch ${RAKU_RELEASE} git://github.com/Raku/nqp.git \ && cd nqp \ && perl Configure.pl --backends=moar --prefix /usr \ && make install \ && cd .. \ && git clone --depth 1 --branch ${RAKU_RELEASE} https://github.com/rakudo/rakudo.git \ && cd rakudo \ && perl Configure.pl --backends=moar --prefix /usr \ && make install \ && ls /usr/share/nqp/ FROM alpine:latest ARG UID=1000 LABEL version="0.5.0" maintainer="[email protected]" raku_release=${RAKU_RELEASE} raku_user_uid=${UID} COPY --from=base /usr/lib/libmoar.so /usr/lib COPY --from=base /usr/share/nqp/ /usr/share/nqp COPY --from=base /usr/share/perl6/ /usr/share/perl6 COPY --from=base /usr/bin/moar /usr/bin/nqp /usr/bin/raku /usr/bin/perl6 /usr/bin/rakudo /usr/bin/ RUN mkdir /github \ && addgroup -S raku && adduser -S raku -G raku --uid ${UID} USER raku WORKDIR /home/raku ENTRYPOINT ["raku"]
FROM ghcr.io/jj/raku-gha ENV PKGS="git tar" PKGS_TMP="make gcc linux-headers musl-dev" WORKDIR="/home/raku" LABEL version="1.0.3" maintainer="[email protected]" rakuversion=$VER USER root RUN apk update && apk upgrade && apk add --no-cache $PKGS $PKGS_TMP USER raku # Environment ENV PATH="${WORKDIR}/.raku/bin:${WORKDIR}/.raku/share/perl6/site/bin:${PATH}" \ ENV="${WORKDIR}/.profile"\ RAKULIB="inst#/home/raku/.raku" # Basic setup, programs and init WORKDIR $WORKDIR RUN git clone --depth 1 https://github.com/ugexe/zef.git \ && cd zef && raku -I. bin/zef install . \ && zef install Linenoise \ && cd .. && rm -rf zef USER root RUN apk del $PGKS_TMP USER raku ENTRYPOINT ["raku"]
Alpine is an amazing little distro for containers, but part of its appeal comes from the fact that it puts a lot of external utilities into BusyBox, and that includes tar. However, in an apparently undocumented move, the caching GHA uses BSD or GNU tar for storing and restoring artifacts. That means it's needed in your container. Check above:
See it in action here. Once the container is GHA-ready, you can run (at least these) Github actions in your workflow as easily as if you were running the default base runner.