mirror of
https://github.com/crazy-max/ghaction-import-gpg.git
synced 2024-12-27 13:32:17 -05:00
22 lines
551 B
Text
22 lines
551 B
Text
|
# syntax=docker/dockerfile:1.2
|
||
|
ARG NODE_VERSION
|
||
|
|
||
|
FROM node:${NODE_VERSION}-alpine AS base
|
||
|
RUN apk add --no-cache git gnupg
|
||
|
WORKDIR /src
|
||
|
|
||
|
FROM base AS deps
|
||
|
RUN --mount=type=bind,target=.,rw \
|
||
|
--mount=type=cache,target=/src/node_modules \
|
||
|
yarn install
|
||
|
|
||
|
FROM deps AS test
|
||
|
ENV RUNNER_TEMP=/tmp/github_runner
|
||
|
ENV RUNNER_TOOL_CACHE=/tmp/github_tool_cache
|
||
|
RUN --mount=type=bind,target=.,rw \
|
||
|
--mount=type=cache,target=/src/node_modules \
|
||
|
yarn run test --coverageDirectory=/tmp/coverage
|
||
|
|
||
|
FROM scratch AS test-coverage
|
||
|
COPY --from=test /tmp/coverage /
|