From 9d365dc8622b943ac8c39d5dc64dc8ade036f425 Mon Sep 17 00:00:00 2001 From: omaroughriss Date: Thu, 3 Jul 2025 13:09:19 +0200 Subject: [PATCH] Update conf --- .github/workflows/cicd.yml | 8 +++++++- Dockerfile | 5 +++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index b7d32d6..c1c4dd1 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -30,6 +30,12 @@ jobs: username: ${{ secrets.USER }} password: ${{ secrets.TOKEN }} + - name: Prepare Config + id: prep + run: | + ESCAPED_CONF=$(echo '${{ secrets.CONF }}' | sed 's/"/\\"/g') + echo "conf=$ESCAPED_CONF" >> $GITHUB_OUTPUT + - name: Build and push uses: docker/build-push-action@v5 with: @@ -37,7 +43,7 @@ jobs: push: true ssh: default build-args: | - CONF=${{ secrets.CONF }} + CONF=${{ steps.prep.outputs.conf }} tags: | ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ gitea.sha }} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 35dfffc..95eba4e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,8 +24,9 @@ COPY --from=builder /app/target/release/sdk_relay /usr/local/bin/sdk_relay # Configuration via build arg ARG CONF -RUN echo "$CONF" > /home/bitcoin/.conf && \ - chown bitcoin:bitcoin /home/bitcoin/.conf +RUN printf '%s\n' "$CONF" > /home/bitcoin/.conf && \ + chown bitcoin:bitcoin /home/bitcoin/.conf && \ + cat /home/bitcoin/.conf # Créer le répertoire .4nk avec les bonnes permissions et le dossier logs RUN mkdir -p /home/bitcoin/.4nk/logs && \