In order to make gem-build-and-release-action run as fast as possible, we want to prebuild the docker container that it uses, so that it does not need to be built everytime the action runs.
FROM ruby:3-alpine
LABEL org.opencontainers.image.authors='Wolf Software <[email protected]>'
LABEL org.opencontainers.image.vendor='Wolf Software'
LABEL org.opencontainers.image.licenses='MIT'
LABEL org.opencontainers.image.title='Gem Release Container'
LABEL org.opencontainers.image.description='Build and publish your gem to RubyGems.org'
LABEL org.opencontainers.image.created="$(date --rfc-3339=seconds --utc)"
LABEL org.opencontainers.image.source='https://github.com/ActionsToolbox/gem-release-docker-image'
LABEL org.opencontainers.image.documentation='https://github.com/ActionsToolbox/gem-release-docker-image'
RUN apk update && \
apk add --no-cache \
bash=5.2.26-r0 \
build-base=0.5-r3 \
git=2.45.2-r0 \
gnupg=2.4.5-r0 \
gpg-agent=2.4.5-r0 \
&& \
sed -i -e "s/bin\/ash/bin\/bash/" /etc/passwd && \
gem install bundler -v '~> 2.5' && \
rm -rf /var/cache/apk/*
ENTRYPOINT ["/bin/bash"]
This allows us to keep the action dockerfile to a bare minimum.
FROM wolfsoftwareltd/gem-release:latest
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]