From 3106b53ab9339dcd62f6d66f5d2f54f053676293 Mon Sep 17 00:00:00 2001 From: aalu1418 <50029043+aalu1418@users.noreply.github.com> Date: Wed, 2 Oct 2024 09:49:27 -0600 Subject: [PATCH] update image to use pnpm instead of yarn --- .github/workflows/rust.yml | 6 +++--- contracts/Dockerfile | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 95183e581..3b92f116b 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -33,7 +33,7 @@ jobs: uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 with: path: contracts/docker-build.tar - key: ${{ runner.os }}-docker-build-${{ needs.get_projectserum_version.outputs.projectserum_version }}-${{ hashFiles('**/Cargo.lock') }}' + key: ${{ runner.os }}-docker-build-${{ needs.get_projectserum_version.outputs.projectserum_version }}-${{ hashFiles('**/Cargo.lock') }} - name: build & save image if: steps.cache-image.outputs.cache-hit != 'true' run: | @@ -61,7 +61,7 @@ jobs: uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 with: path: contracts/docker-build.tar - key: ${{ runner.os }}-docker-build-${{ needs.get_projectserum_version.outputs.projectserum_version }}-${{ hashFiles('**/Cargo.lock') }}' + key: ${{ runner.os }}-docker-build-${{ needs.get_projectserum_version.outputs.projectserum_version }}-${{ hashFiles('**/Cargo.lock') }} - name: load cached image run: | docker load --input docker-build.tar @@ -101,7 +101,7 @@ jobs: uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 with: path: contracts/docker-build.tar - key: ${{ runner.os }}-docker-build-${{ needs.get_projectserum_version.outputs.projectserum_version }}-${{ hashFiles('**/Cargo.lock') }}' + key: ${{ runner.os }}-docker-build-${{ needs.get_projectserum_version.outputs.projectserum_version }}-${{ hashFiles('**/Cargo.lock') }} - name: load cached image run: | docker load --input docker-build.tar diff --git a/contracts/Dockerfile b/contracts/Dockerfile index 2ad1ddf22..5501fc7d5 100644 --- a/contracts/Dockerfile +++ b/contracts/Dockerfile @@ -8,3 +8,7 @@ RUN cd /contracts && anchor build # only keep downloaded artifacts in /root/.cargo cached RUN rm -rf /contracts + +# remove yarn dependency, use pnpm +RUN npm uninstall -g yarn +RUN npm install -g pnpm