Skip to content

Commit

Permalink
Update to Node 18, Alpine 3.16 w/ Chromium 102
Browse files Browse the repository at this point in the history
  • Loading branch information
claabs committed Nov 26, 2022
1 parent 452c759 commit a472315
Show file tree
Hide file tree
Showing 8 changed files with 171 additions and 109 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/build-and-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

name: Build and Lint

# Controls when the action will run. Triggers the workflow on push or pull request
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master, develop ]
branches: [master, develop]
pull_request:
branches: [ master ]
branches: [master]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
Expand All @@ -19,18 +19,18 @@ jobs:

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: Setup Node.js for use with actions
uses: actions/setup-node@v2
with:
node-version: '16'
cache: 'npm'
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: NPM install
run: npm ci
- name: Setup Node.js for use with actions
uses: actions/setup-node@v2
with:
node-version-file: ".nvmrc"
cache: "npm"

# Runs a single command using the runners shell
- name: Build and lint
run: npm run lint
- name: NPM install
run: npm ci

# Runs a single command using the runners shell
- name: Build and lint
run: npm run lint
6 changes: 3 additions & 3 deletions .github/workflows/typedoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:
- name: Setup Node.js for use with actions
uses: actions/setup-node@v2
with:
node-version: '16'
cache: 'npm'
node-version-file: ".nvmrc"
cache: "npm"

- name: NPM install
run: npm ci
Expand All @@ -31,4 +31,4 @@ jobs:
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
publish_dir: ./docs
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16
18
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
########
# BASE
########
FROM node:16-alpine3.15 as base
FROM node:18-alpine3.16 as base

ENV DISTRO=alpine
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1
Expand All @@ -14,12 +14,12 @@ WORKDIR /usr/app
FROM base as deps

# Chromium dependencies https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md#running-on-alpine
# To find latest chromium version for puppeteer, go to https://github.com/puppeteer/puppeteer/blob/v13.4.0/src/revisions.ts,
# To find latest chromium version for puppeteer, go to https://github.com/puppeteer/puppeteer/blob/v18.2.1/packages/puppeteer-core/src/revisions.ts,
# select the correct tag for the puppeteer version, and note the chromium revision number. Then go
# to https://omahaproxy.appspot.com/ and in "Find Releases" search for "r<version number>". Then
# ensure that version is published at https://pkgs.alpinelinux.org/package/v3.15/community/x86_64/chromium
# ensure that version is published at https://pkgs.alpinelinux.org/package/v3.16/community/x86_64/chromium
RUN apk add --no-cache \
'chromium=~99' \
'chromium=~102' \
nss \
freetype \
harfbuzz \
Expand Down Expand Up @@ -72,7 +72,7 @@ LABEL org.opencontainers.image.title="epicgames-freegames-node" \
org.opencontainers.image.name="epicgames-freegames-node" \
org.opencontainers.image.revision=${COMMIT_SHA} \
org.opencontainers.image.ref.name=${BRANCH} \
org.opencontainers.image.base.name="node:16-alpine3.15" \
org.opencontainers.image.base.name="node:18-alpine3.16" \
org.opencontainers.image.version="latest"

ENV NODE_ENV=production \
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.debian
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
########
# BASE
########
FROM node:16-bullseye-slim as base
FROM node:18-bullseye-slim as base

ENV DISTRO=debian
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1
Expand Down Expand Up @@ -77,7 +77,7 @@ LABEL org.opencontainers.image.title="epicgames-freegames-node" \
org.opencontainers.image.name="epicgames-freegames-node" \
org.opencontainers.image.revision=${COMMIT_SHA} \
org.opencontainers.image.ref.name=${BRANCH} \
org.opencontainers.image.base.name="node:16-bullseye-slim" \
org.opencontainers.image.base.name="node:18-bullseye-slim" \
org.opencontainers.image.version="bullseye-slim"

ENV NODE_ENV=production \
Expand Down
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ If for some reason you don't want to use Docker to run this tool you can run it
* Or download and unpack ZIP archive: [epicgames-freegames-node](https://github.com/claabs/epicgames-freegames-node/archive/master.zip)
1. Create `config` folder in the cloned/unpacked directory
1. Create [JSON configuration](#json-configuration)
1. [Install Node.js 16](https://nodejs.org/) or higher
1. [Install Node.js 18](https://nodejs.org/) or higher
1. Install Node.js dependencies
* Start terminal and navigate to cloned/unpacked directory
* Run `npm i`
Expand Down
Loading

0 comments on commit a472315

Please sign in to comment.