Update Dockerfile
This commit is contained in:
6
.github/workflows/workflow.yml
vendored
6
.github/workflows/workflow.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: Build, tests and analyze
|
||||
name: Build, test, analyze and publish
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -11,6 +11,7 @@ on:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build and test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
@@ -21,6 +22,7 @@ jobs:
|
||||
run: docker run --workdir=/metrics --entrypoint="" lowlighter/metrics:${{ github.head_ref || 'master' }} npm test
|
||||
|
||||
analyze:
|
||||
name: Analyze code
|
||||
runs-on: ubuntu-latest
|
||||
needs: [ build ]
|
||||
steps:
|
||||
@@ -35,7 +37,7 @@ jobs:
|
||||
uses: github/codeql-action/analyze@v1
|
||||
|
||||
publish:
|
||||
name: Publish Docker image to GitHub Packages
|
||||
name: Publish to GitHub Packages
|
||||
runs-on: ubuntu-latest
|
||||
needs: [ build, analyze ]
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
||||
|
||||
@@ -5,7 +5,7 @@ FROM node:15-buster-slim
|
||||
COPY . /metrics
|
||||
|
||||
# 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
|
||||
# Based on https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md#running-puppeteer-in-docker
|
||||
&& apt-get update \
|
||||
@@ -32,4 +32,4 @@ ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
|
||||
ENV PUPPETEER_BROWSER_PATH "google-chrome-stable"
|
||||
|
||||
# Execute GitHub action
|
||||
ENTRYPOINT node /metrics/action/index.mjs
|
||||
ENTRYPOINT node /metrics/source/app/action/index.mjs
|
||||
Reference in New Issue
Block a user