Use a Docker action instead

This commit is contained in:
Marcos Gaeta
2020-07-09 11:14:18 -07:00
parent bbafa5e717
commit 16d92aaad7
3 changed files with 28 additions and 2 deletions
+24
View File
@@ -0,0 +1,24 @@
FROM node:12-buster as builder
WORKDIR /app
COPY package.json yarn.lock ./
RUN export YARN_CACHE_FOLDER="$(mktemp -d)" \
&& yarn install --frozen-lockfile --quiet \
&& rm -r "$YARN_CACHE_FOLDER"
COPY . .
RUN yarn build
FROM node:12-buster
COPY --from=builder /app/package.json /app/yarn.lock /action-release/
RUN export YARN_CACHE_FOLDER="$(mktemp -d)" \
&& cd /action-release \
&& yarn install --frozen-lockfile --production --quiet \
&& rm -r "$YARN_CACHE_FOLDER"
COPY --from=builder /app/dist /action-release/dist/
RUN chmod +x /action-release/dist/index.js
#RUN ln -s /action-release/dist/index.js ./dist/index.js
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
+2 -2
View File
@@ -15,8 +15,8 @@ inputs:
description: 'Unix timestamp '
required: false
runs:
using: 'node12'
main: 'dist/index.js'
using: 'docker'
image: 'Dockerfile'
branding:
icon: 'triangle'
color: 'purple'
Executable
+2
View File
@@ -0,0 +1,2 @@
#!/bin/sh -l
node /action-release/dist/index.js