Files
Publish-Docker-Github-Action/Dockerfile
2019-09-23 20:37:42 +02:00

27 lines
709 B
Docker

FROM docker:19.03.2 as runtime
LABEL "com.github.actions.name"="Publish Docker"
LABEL "com.github.actions.description"="Uses the git branch as the docker tag and pushes the container"
LABEL "com.github.actions.icon"="anchor"
LABEL "com.github.actions.color"="blue"
LABEL "repository"="https://github.com/elgohr/Publish-Docker-Github-Action"
LABEL "maintainer"="Lars Gohr"
RUN apk update \
&& apk upgrade \
&& apk add --no-cache git
ADD entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
FROM runtime as testEnv
RUN apk add --no-cache coreutils bats ncurses
FROM testEnv as test
ADD test.bats /test.bats
ADD stub.sh /usr/local/bin/docker
ADD mock.sh /usr/bin/date
RUN /test.bats
FROM runtime