From 5061f6587d046067470d06d9a5e4b86baa85e686 Mon Sep 17 00:00:00 2001 From: James Greenhill Date: Tue, 30 Jan 2024 11:24:46 -0800 Subject: [PATCH] move to pnpm for gh actions --- .github/workflows/docker-frontend.yaml | 43 ++++++++++---------------- 1 file changed, 16 insertions(+), 27 deletions(-) diff --git a/.github/workflows/docker-frontend.yaml b/.github/workflows/docker-frontend.yaml index 58fff33..34c3687 100644 --- a/.github/workflows/docker-frontend.yaml +++ b/.github/workflows/docker-frontend.yaml @@ -8,25 +8,21 @@ jobs: runs-on: ubuntu-latest defaults: run: - working-directory: 'frontend' + working-directory: "frontend" permissions: contents: read packages: write steps: - - - uses: actions/checkout@v3 - - - name: Set up QEMU + - uses: actions/checkout@v3 + - name: Set up QEMU uses: docker/setup-qemu-action@v2 with: platforms: arm64 - - - name: Set up Docker Buildx + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 - - - name: Docker image metadata + - name: Docker image metadata id: meta uses: docker/metadata-action@v4 with: @@ -36,33 +32,26 @@ jobs: type=raw,value=main,enable=${{ github.ref == 'refs/heads/main' }} type=ref,event=pr type=sha - - - name: Login to GitHub Container Registry + - name: Login to GitHub Container Registry uses: docker/login-action@v2 with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Install Node.js + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Install Node.js uses: actions/setup-node@v3 with: node-version-file: frontend/.node-version - cache: 'npm' + cache: "pnpm" cache-dependency-path: frontend/package-lock.json - - - name: Install dependencies - run: npm install + - name: Install dependencies + run: pnpm i - - - name: Build - run: npm run build - env: - NODE_OPTIONS: --openssl-legacy-provider + - name: Build + run: pnpm build - - - name: Build and push + - name: Build and push uses: docker/build-push-action@v4 with: context: frontend/