From 97d6222297be51722960479ff03076f74e35316c Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Tue, 25 Aug 2026 15:20:57 -0700 Subject: [PATCH] add a lockfile check --- .github/workflows/check-lockfile.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/check-lockfile.yml diff --git a/.github/workflows/check-lockfile.yml b/.github/workflows/check-lockfile.yml new file mode 100644 index 000000000..b98880545 --- /dev/null +++ b/.github/workflows/check-lockfile.yml @@ -0,0 +1,22 @@ +name: Lockfile Check (Client & Server) +on: + pull_request: + workflow_dispatch: + +jobs: + check-lockfiles: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + # Validate with the same node image the production build uses, so a lock + # that passes here cannot fail the image build's npm ci. + - name: Resolve node image from Dockerfile + id: node-image + run: echo "image=$(grep -m1 -o 'node:[^ ]*' docker/Dockerfile)" >> "$GITHUB_OUTPUT" + + - name: Check server lockfile + run: docker run --rm -v "$PWD/server":/w -w /w ${{ steps.node-image.outputs.image }} npm ci --dry-run + + - name: Check client lockfile + run: docker run --rm -v "$PWD/client":/w -w /w ${{ steps.node-image.outputs.image }} npm ci --dry-run