Add support to generate charts in habits plugin (#26)

* Add charts to habits plugin
* Dockerfile update
* Add support for dflags
This commit is contained in:
Simon Lecoq
2020-12-23 00:10:46 +01:00
committed by GitHub
parent 5335ef69a1
commit 25a82b319b
13 changed files with 341 additions and 73 deletions

View File

@@ -1,25 +1,29 @@
# Based on https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md#running-puppeteer-in-docker
# Base image
FROM node:15-slim
FROM node:15-buster-slim
# Install latest chrome dev package and fonts to support major charsets
RUN apt-get update \
# Copy GitHub action
COPY action/dist/index.js /index.js
# Setup
RUN chmod +x /index.js \
# Install latest chrome dev package, fonts to support major charsets and skip chromium download on puppeteer install
# Based on https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md#running-puppeteer-in-docker
&& apt-get update \
&& apt-get install -y wget gnupg ca-certificates libgconf-2-4 \
&& 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 install -y google-chrome-stable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf libxss1 \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
# Uncomment to skip the chromium download when installing puppeteer
&& rm -rf /var/lib/apt/lists/* \
# Install ruby to support linguist
# Based on https://github.com/github/linguist
&& apt-get update \
&& apt-get install -y ruby-full \
&& apt-get install -y git g++ cmake pkg-config libicu-dev zlib1g-dev libcurl4-openssl-dev libssl-dev ruby-dev \
&& gem install github-linguist
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
ENV PUPPETEER_BROWSER_PATH "google-chrome-stable"
# Copy action
COPY action/dist/index.js /index.js
RUN chmod +x /index.js
# Execute action
# Execute GitHub action
ENTRYPOINT node /index.js