Skip to content

Commit

Permalink
using docker
Browse files Browse the repository at this point in the history
  • Loading branch information
Panduss committed Feb 8, 2023
1 parent 6fd637e commit a159f61
Show file tree
Hide file tree
Showing 12 changed files with 26 additions and 116,321 deletions.
23 changes: 23 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM node:18

RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' && \
apt-get update && \
apt-get -y install xvfb gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 \
libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 \
libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 \
libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 \
libxtst6 ca-certificates fonts-liberation libnss3 lsb-release xdg-utils wget curl google-chrome-stable \
fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf && \
rm -rf /var/lib/apt/lists/*

COPY src/* /
COPY package.json /
COPY package-lock.json /

RUN npm install
RUN fc-cache -fv && \
chmod +x /index.js && \
ln -s /index.js /usr/local/bin/publish-pdf-version-action

CMD [ "publish-pdf-version-action" ]
14 changes: 3 additions & 11 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: 'Publish PDF Version Action'
description: 'Generate a new pdf for each version released'
runs:
using: 'docker'
image: 'Dockerfile'
inputs:
region:
description: "The region of the bucket"
Expand All @@ -25,14 +28,3 @@ inputs:
outputs:
url:
description: 'The URL of the uploaded pdf'
runs:
using: 'composite'
steps:
- name: Run puppeteer
id: puppeteer-run
uses: tj-actions/docker-run@v2
with:
image: ghcr.io/puppeteer/puppeteer:19.4.1
name: puppeteer-chrome
options: '-i --init --cap-add=SYS_ADMIN -v ${{ github.workspace }}:${{ github.workspace }}'
args: bash -c 'cp ${{ github.workspace }}/** /home/pptruser && npm install && node dist/index.js'
Binary file removed dist/caution.png
Binary file not shown.
Binary file removed dist/dateManufacturer.png
Binary file not shown.
Binary file removed dist/eifu.png
Binary file not shown.
116,256 changes: 0 additions & 116,256 deletions dist/index.js

This file was deleted.

Binary file removed dist/lot.png
Binary file not shown.
Binary file removed dist/manufacturer.png
Binary file not shown.
54 changes: 0 additions & 54 deletions dist/pdf.css

This file was deleted.

Binary file removed dist/ref.png
Binary file not shown.
Binary file removed dist/udi.png
Binary file not shown.
Binary file removed dist/ukca.png
Binary file not shown.

0 comments on commit a159f61

Please sign in to comment.