Update Dockerfile

This commit is contained in:
linguist
2020-12-30 20:37:05 +01:00
parent 98079908a2
commit 9945d096ba
2 changed files with 6 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
name: Build, tests and analyze name: Build, test, analyze and publish
on: on:
push: push:
@@ -11,6 +11,7 @@ on:
jobs: jobs:
build: build:
name: Build and test
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout repository - name: Checkout repository
@@ -21,6 +22,7 @@ jobs:
run: docker run --workdir=/metrics --entrypoint="" lowlighter/metrics:${{ github.head_ref || 'master' }} npm test run: docker run --workdir=/metrics --entrypoint="" lowlighter/metrics:${{ github.head_ref || 'master' }} npm test
analyze: analyze:
name: Analyze code
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [ build ] needs: [ build ]
steps: steps:
@@ -35,7 +37,7 @@ jobs:
uses: github/codeql-action/analyze@v1 uses: github/codeql-action/analyze@v1
publish: publish:
name: Publish Docker image to GitHub Packages name: Publish to GitHub Packages
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [ build, analyze ] needs: [ build, analyze ]
if: github.event_name == 'push' && github.ref == 'refs/heads/master' if: github.event_name == 'push' && github.ref == 'refs/heads/master'

View File

@@ -5,7 +5,7 @@ FROM node:15-buster-slim
COPY . /metrics COPY . /metrics
# Setup # Setup
RUN chmod +x /metrics/action/index.mjs \ RUN chmod +x /metrics/source/app/action/index.mjs \
# Install latest chrome dev package, fonts to support major charsets and skip chromium download on puppeteer install # 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 # Based on https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md#running-puppeteer-in-docker
&& apt-get update \ && apt-get update \
@@ -32,4 +32,4 @@ ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
ENV PUPPETEER_BROWSER_PATH "google-chrome-stable" ENV PUPPETEER_BROWSER_PATH "google-chrome-stable"
# Execute GitHub action # Execute GitHub action
ENTRYPOINT node /metrics/action/index.mjs ENTRYPOINT node /metrics/source/app/action/index.mjs