fix: Correction des problèmes de PATH et SSH dans la CI
Some checks failed
build-and-push-ext / build_push (push) Failing after 41s

- Ajout du PATH pour wasm-pack dans le workflow
- Source de l'environnement Rust avant build_wasm
- Remplacement SSH par HTTPS pour cloner sdk_client
- Simplification du Dockerfile sans SSH
- Suppression des étapes --mount=type=ssh
- Toutes les dépendances accessibles via HTTPS
This commit is contained in:
4NK Dev 2025-09-20 22:45:57 +00:00
parent 36c14652bc
commit 9eb3255fdf
2 changed files with 14 additions and 19 deletions

View File

@ -30,7 +30,9 @@ jobs:
components: rustfmt, clippy components: rustfmt, clippy
- name: Install wasm-pack - name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh run: |
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Setup SSH for git clone - name: Setup SSH for git clone
run: | run: |
@ -41,10 +43,12 @@ jobs:
- name: Clone sdk_client - name: Clone sdk_client
run: | run: |
git clone -b dev git@git.4nkweb.com:4nk/sdk_client.git ../sdk_client git clone -b dev https://git.4nkweb.com/4nk/sdk_client.git ../sdk_client
- name: Build WebAssembly - name: Build WebAssembly
run: npm run build_wasm run: |
source $HOME/.cargo/env
npm run build_wasm
- name: Build project - name: Build project
run: npm run build run: npm run build
@ -67,7 +71,7 @@ jobs:
DOCKER_BUILDKIT: "1" DOCKER_BUILDKIT: "1"
run: | run: |
set -euo pipefail set -euo pipefail
docker build --ssh default \ docker build \
-t git.4nkweb.com/4nk/sdk_signer:ext \ -t git.4nkweb.com/4nk/sdk_signer:ext \
-f Dockerfile . -f Dockerfile .

View File

@ -5,7 +5,6 @@ WORKDIR /build
# Installation des dépendances nécessaires pour la compilation # Installation des dépendances nécessaires pour la compilation
RUN apk update && apk add --no-cache \ RUN apk update && apk add --no-cache \
git \ git \
openssh-client \
curl \ curl \
nodejs \ nodejs \
npm \ npm \
@ -13,27 +12,20 @@ RUN apk update && apk add --no-cache \
pkgconfig \ pkgconfig \
clang \ clang \
llvm \ llvm \
musl-dev \ musl-dev
nginx
# Installation de wasm-pack # Installation de wasm-pack
RUN curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh RUN curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
# Configuration SSH basique
RUN mkdir -p /root/.ssh && \
ssh-keyscan git.4nkweb.com >> /root/.ssh/known_hosts
# On se place dans le bon répertoire parent
WORKDIR /build
# Copie du projet sdk_signer # Copie du projet sdk_signer
COPY . sdk_signer/ COPY . sdk_signer/
# Clonage du sdk_client au même niveau que sdk_signer en utilisant la clé SSH montée # Clonage du sdk_client au même niveau que sdk_signer
RUN --mount=type=ssh git clone -b dev ssh://git@git.4nkweb.com/4nk/sdk_client.git RUN git clone -b dev https://git.4nkweb.com/4nk/sdk_client.git
# Build du WebAssembly avec accès SSH pour les dépendances # Build du WebAssembly
WORKDIR /build/sdk_client WORKDIR /build/sdk_client
RUN --mount=type=ssh wasm-pack build --out-dir ../sdk_signer/pkg --target nodejs --dev RUN wasm-pack build --out-dir ../sdk_signer/pkg --target nodejs --dev
FROM node:20-alpine FROM node:20-alpine
WORKDIR /app WORKDIR /app
@ -53,4 +45,3 @@ RUN npm run build
EXPOSE 9090 EXPOSE 9090
CMD ["npm", "start"] CMD ["npm", "start"]