Skip to content

Commit d4d5e80

Browse files
[mirotalkc2c] - ci: upgrade Docker actions and stabilize arm64 image build
1 parent 802f035 commit d4d5e80

2 files changed

Lines changed: 15 additions & 12 deletions

File tree

.github/workflows/ci.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ jobs:
1010
runs-on: ubuntu-22.04 # LTS
1111
steps:
1212
- name: Checkout
13-
uses: actions/checkout@v3
13+
uses: actions/checkout@v4
1414

1515
- name: Set up Node.js
16-
uses: actions/setup-node@v3
16+
uses: actions/setup-node@v4
1717
with:
1818
node-version: '22.x' # LTS
1919

@@ -28,22 +28,24 @@ jobs:
2828
needs: test # This ensures the build job only runs if the test job succeeds
2929
steps:
3030
- name: Checkout
31-
uses: actions/checkout@v3
31+
uses: actions/checkout@v4
3232

3333
- name: Set up QEMU
34-
uses: docker/setup-qemu-action@v2
34+
uses: docker/setup-qemu-action@v3
35+
with:
36+
platforms: arm64
3537

3638
- name: Set up Docker Buildx
37-
uses: docker/setup-buildx-action@v2
39+
uses: docker/setup-buildx-action@v3
3840

3941
- name: Login Docker Hub
40-
uses: docker/login-action@v2
42+
uses: docker/login-action@v3
4143
with:
4244
username: ${{ secrets.DOCKERHUB_USERNAME }}
4345
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
4446

4547
- name: Build and publish
46-
uses: docker/build-push-action@v3
48+
uses: docker/build-push-action@v6
4749
with:
4850
context: ./
4951
file: ./Dockerfile

Dockerfile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Use a lightweight Node.js image
2-
FROM node:22-alpine
1+
# Use Debian slim for more reliable multi-arch builds under emulation
2+
FROM node:22-bookworm-slim
33

44
# Set working directory
55
WORKDIR /src
@@ -12,12 +12,13 @@ COPY package*.json ./
1212
COPY .env.template ./.env
1313

1414
# Install necessary system packages and dependencies
15-
RUN apk add --no-cache \
15+
RUN apt-get update \
16+
&& apt-get install -y --no-install-recommends \
1617
bash \
1718
vim \
18-
&& npm ci --only=production --silent \
19+
&& npm ci --omit=dev --silent \
1920
&& npm cache clean --force \
20-
&& rm -rf /tmp/* /var/tmp/* /usr/share/doc/*
21+
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
2122

2223
# Copy the application code
2324
COPY frontend frontend

0 commit comments

Comments
 (0)