generated from actions/container-toolkit-action
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from udondan/improvements
Various improvements (options, server, re-using image)
- Loading branch information
Showing
8 changed files
with
56 additions
and
244 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,27 @@ | ||
name: 'HTML to PDF' | ||
description: 'Node module that converts HTML files to PDFs.' | ||
author: '[email protected]' | ||
name: "HTML to PDF" | ||
description: "Converts HTML file to PDF." | ||
author: "[email protected]" | ||
inputs: | ||
htmlFile: | ||
description: 'html file path' | ||
description: "html file path" | ||
required: true | ||
|
||
outputFile: | ||
description: 'output file path' | ||
description: "output file path" | ||
required: true | ||
|
||
pdfOptions: | ||
description: | | ||
PDF options as described here: | ||
https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pagepdfoptions - | ||
Needs to be in JSON format, e.g. `{"format": "A4", "pageRanges": "1"}` | ||
required: false | ||
default: "{}" | ||
|
||
runs: | ||
using: 'docker' | ||
image: 'Dockerfile' | ||
using: "docker" | ||
image: "Dockerfile" | ||
|
||
branding: | ||
color: "blue" | ||
icon: "file" | ||
icon: "file" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,11 @@ | ||
FROM node:10-alpine | ||
FROM buildkite/puppeteer | ||
|
||
LABEL MAINTAINER="Xudong Cai <[email protected]>" | ||
ENV TZ=Asia/Shanghai | ||
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true | ||
|
||
#[email protected] | ||
RUN sed -i 's!http://dl-cdn.alpinelinux.org/!https://mirrors.aliyun.com/!g' /etc/apk/repositories \ | ||
&& apk update && apk upgrade && \ | ||
echo @edge https://mirrors.aliyun.com/alpine/edge/community >> /etc/apk/repositories && \ | ||
echo @edge https://mirrors.aliyun.com/alpine/edge/main >> /etc/apk/repositories && \ | ||
apk --no-cache add \ | ||
tzdata \ | ||
curl \ | ||
ca-certificates \ | ||
chromium@edge \ | ||
nss@edge \ | ||
fontconfig \ | ||
freetype \ | ||
ttf-dejavu \ | ||
ttf-droid \ | ||
ttf-freefont \ | ||
mesa-egl \ | ||
mesa-gles \ | ||
&& mkdir /usr/lib/chromium/swiftshader/ \ | ||
&& cp /usr/lib/libGLESv2.so.2 /usr/lib/chromium/swiftshader/libGLESv2.so \ | ||
&& cp /usr/lib/libEGL.so.1 /usr/lib/chromium/swiftshader/libEGL.so \ | ||
&& ln -sf /usr/bin/chromium-browser /usr/local/bin/chrome \ | ||
&& ln -sf /usr/share/zoneinfo/$TZ /etc/localtime \ | ||
&& echo $TZ > /etc/timezone \ | ||
&& mkdir -p /usr/share/fonts/chinese/TrueType/ | ||
COPY simsun.ttf /usr/share/fonts/chinese/TrueType/simsun.ttf | ||
RUN fc-cache -fv | ||
ENTRYPOINT ["node", "/lib/main.js"] | ||
|
||
COPY . . | ||
|
||
RUN npm install --production | ||
RUN mv simsun.ttf /usr/local/share/fonts/ | ||
|
||
ENTRYPOINT ["node", "/lib/main.js"] | ||
RUN npm install --production |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.