Skip to content

Commit 08249b2

Browse files
committed
r0b08x [chore] 5/4/2024, 6:03:17 PM
1 parent 0b30568 commit 08249b2

File tree

2 files changed

+24
-27
lines changed

2 files changed

+24
-27
lines changed

.github/workflows/Dockerfile

+23-26
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,35 @@
1-
# Stage 1: Build the Electron app with Node.js on an ARM64 architecture
2-
FROM arm64v8/node:lts as builder
1+
FROM arm64v8/ubuntu:latest
2+
3+
# Setup environment and install necessary packages
4+
RUN apt-get update && apt-get install -y \
5+
curl \
6+
software-properties-common \
7+
gnupg
8+
9+
# Add the NodeSource repository for the latest Node.js LTS version
10+
RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash -
11+
12+
# Install Node.js LTS and Snapcraft
13+
RUN apt-get update && apt-get install -y \
14+
nodejs \
15+
snapcraft
316

417
# Set the working directory
518
WORKDIR /app
619

7-
COPY package*.json ./
8-
RUN npm install
20+
# Copy your project files into the Docker image
21+
COPY . /app
922

10-
COPY . .
23+
# Install project dependencies
24+
RUN yarn install
1125

12-
# Here, ensure all environment variables needed are set
26+
# Build your Electron app (assuming npm script is correctly set)
1327
ENV NODE_ENV=production
1428

1529
RUN node ./scripts/fix-packages-publish.js before
1630
RUN npm run publish-electron-arm64 --verbose
1731
RUN node ./scripts/fix-packages-publish.js after
1832

19-
# Stage 2: Use an ARM64 Ubuntu image to install and use Snapcraft
20-
FROM arm64v8/ubuntu:latest
21-
22-
RUN apt-get update && \
23-
apt-get install -y software-properties-common && \
24-
add-apt-repository universe && \
25-
apt-get update && \
26-
apt-get install -y snapcraft
27-
28-
# Continue with your setup
29-
30-
# Copy the built app from the first stage
31-
COPY --from=builder /app /app
32-
33-
# Set the working directory
34-
WORKDIR /app
35-
36-
# Build the snap (assuming snapcraft.yaml is configured)
37-
# Uncomment the next line if you need to build the snap as part of the Docker build
38-
# RUN snapcraft
33+
# Optional: specify where the snap file should be stored (if you want to copy it out)
34+
# VOLUME [ "/output" ]
35+
# RUN cp *.snap /output/

.github/workflows/test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
- master
1010

1111
jobs:
12-
build:
12+
snap-arm64:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout code

0 commit comments

Comments
 (0)