Skip to content

Commit 6458b29

Browse files
committed
Fix workflow: pin Node 20, use Buildx, upgrade to build-push-action@v6, add layer caching
1 parent 4e41008 commit 6458b29

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

.github/workflows/docker-publish.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ jobs:
2323
- name: Checkout
2424
uses: actions/checkout@v4
2525

26+
- name: Set up Node.js
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: '20'
30+
31+
- name: Set up Docker Buildx
32+
uses: docker/setup-buildx-action@v3
33+
2634
- name: Log in to GHCR
2735
uses: docker/login-action@v3
2836
with:
@@ -49,12 +57,14 @@ jobs:
4957
type=semver,pattern={{version}},enable=${{ startsWith(github.ref, 'refs/tags/') }}
5058
5159
- name: Build & push frontend
52-
uses: docker/build-push-action@v5
60+
uses: docker/build-push-action@v6
5361
with:
5462
context: ./frontend
5563
push: true
5664
tags: ${{ steps.frontend-meta.outputs.tags }}
5765
labels: ${{ steps.frontend-meta.outputs.labels }}
66+
cache-from: type=gha
67+
cache-to: type=gha,mode=max
5868

5969
# ── Backend ─────────────────────────────────────────────────────────────
6070

@@ -69,9 +79,11 @@ jobs:
6979
type=semver,pattern={{version}},enable=${{ startsWith(github.ref, 'refs/tags/') }}
7080
7181
- name: Build & push backend
72-
uses: docker/build-push-action@v5
82+
uses: docker/build-push-action@v6
7383
with:
7484
context: ./backend
7585
push: true
7686
tags: ${{ steps.backend-meta.outputs.tags }}
7787
labels: ${{ steps.backend-meta.outputs.labels }}
88+
cache-from: type=gha
89+
cache-to: type=gha,mode=max

0 commit comments

Comments
 (0)