Skip to content

Commit

Permalink
chore(ci): rebuild sharp for arm64 and cache node_modules (#1434)
Browse files Browse the repository at this point in the history
* chore(ci): rebuild sharp for arm64 and cache node_modules
  • Loading branch information
0fatal authored Aug 1, 2023
1 parent 1d1d249 commit 995d798
Show file tree
Hide file tree
Showing 2 changed files with 128 additions and 30 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/dockerize-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ on:
branches:
- main
paths:
- "server/**"
- ".github/workflows/dockerize-server.yml"
- "!**/*.md"
- "!server/package-lock.json"
- 'server/**'
- '.github/workflows/dockerize-server.yml'
- '!**/*.md'
- '!server/package-lock.json'

concurrency:
group: dockerize-server-${{ github.ref }}
Expand All @@ -24,14 +24,22 @@ jobs:
with:
fetch-depth: 0

- name: Cache node modules
id: cache-node-modules
uses: actions/cache@v3
with:
path: server/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('server/package-lock.json') }}

- name: Use Node
uses: actions/setup-node@v3
with:
node-version: 18.x

- name: Install Package
working-directory: server
run: npm cache clean --force && npm install
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm ci && npm rebuild --arch=arm64 sharp

- name: Build server
working-directory: server
Expand Down
140 changes: 115 additions & 25 deletions server/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 995d798

Please sign in to comment.