Use a Docker action instead
This commit is contained in:
+24
@@ -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
@@ -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
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh -l
|
||||
node /action-release/dist/index.js
|
||||
Reference in New Issue
Block a user