Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
30 changes: 1 addition & 29 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,4 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}

- run: npm ci

- run: npm run build --if-present
env:
RELATIVE_CI_KEY: ${{ secrets.RELATIVE_CI_KEY }}
DEBUG: ${{ secrets.DEBUG }}

- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: artifacts
path: artifacts
- run: npm run container-build
18 changes: 18 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from node:16 as base

ARG CI=true
ARG SERVICE="github-action-docker"
ARG REPOSITORY
ARG BRANCH
ARG PR
ARG BUILD
ARG BUILD_URL
ARG SHA

COPY . /app
WORKDIR /app

from base as build

RUN npm install
RUN DEBUG=relative-ci:* npm run build
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"scripts": {
"start": "webpack-dev-server",
"build": "webpack --mode production --json artifacts/webpack-stats.json",
"container-build": "docker build . --no-cache-filter=build --progress=plain",
"test": "echo \"Error: no test specified\" && exit 0"
},
"keywords": [],
Expand Down