Skip to content

Commit ffbc879

Browse files
Merge pull request #132 from Impre-visible/test/workflow
actions: Improve actions cache
2 parents 2f23a00 + c496f43 commit ffbc879

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

.dockerignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
backend/.env
22
backend/.env.example
3-
backend/package-lock.json
43
backend/node_modules
54

65

76
frontend/.env
87
frontend/.env.example
9-
frontend/package-lock.json
108
frontend/node_modules

.github/workflows/docker-publish.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ jobs:
5757
- name: Lowercase repo name
5858
run: echo "REPO_NAME_LOWER=$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
5959

60+
- name: Check Docker cache
61+
run: |
62+
docker buildx du
63+
6064
- name: Build and push Docker image
6165
uses: docker/build-push-action@v5
6266
with:
@@ -65,5 +69,5 @@ jobs:
6569
tags: ghcr.io/${{ env.REPO_NAME_LOWER }}:${{ env.IMAGE_TAG }}
6670
labels: ${{ steps.meta.outputs.labels }}
6771
platforms: linux/amd64,linux/arm64
68-
cache-from: type=gha
69-
cache-to: type=gha,mode=max
72+
cache-from: type=gha,scope=repository,mode=max
73+
cache-to: type=gha,mode=max,scope=repository

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ FROM node:22-bullseye AS backend-builder
22

33
WORKDIR /app
44

5-
COPY backend/package*.json ./
5+
COPY backend/package.json ./package.json
66

77
RUN npm install
88

9-
COPY backend/ .
9+
COPY backend/. .
1010

1111
RUN npx prisma generate
1212
RUN npm run build
@@ -15,11 +15,11 @@ FROM node:22-bullseye AS frontend-builder
1515

1616
WORKDIR /app
1717

18-
COPY frontend/package*.json ./
18+
COPY frontend/package.json ./package.json
1919

2020
RUN npm install
2121

22-
COPY frontend/ .
22+
COPY frontend/. .
2323

2424
RUN npm run build
2525

0 commit comments

Comments
 (0)