Skip to content

Commit fd0644a

Browse files
committed
CI: ensure package-lock.json exists to avoid build cache checksum errors
1 parent 6909e7a commit fd0644a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.github/workflows/docker-build.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,14 @@ jobs:
5151
5252
- name: Build and push Docker image
5353
uses: docker/build-push-action@v5
54+
# Ensure package-lock.json exists to avoid BuildKit checksum errors when restoring cache
55+
# (some previous caches may reference package-lock.json; creating a harmless file prevents failures)
56+
env:
57+
GITHUB_WORKSPACE: ${{ github.workspace }}
58+
- name: Ensure package-lock.json exists
59+
run: |
60+
if [ ! -f package-lock.json ]; then echo '{}' > package-lock.json; fi
61+
5462
with:
5563
context: .
5664
file: ./Dockerfile

0 commit comments

Comments
 (0)