Skip to content

Commit ceb7d20

Browse files
waleedlatif1claude
andauthored
fix(docker): use full bun.lock + bump deprecated GHA actions (#4323)
* fix(docker): use full bun.lock and copy it into builder The staging build for app.Dockerfile (commit dc20229, PR #4322) is failing in two ways after switching to turbo prune: 1. turbo 2.9.6's pruned bun.lock is malformed for bun 1.3.x: error: Failed to resolve prod dependency 'wrap-ansi' for package 'log-update' at bun.lock:2688:5 Bun ignores it and falls back to a fresh resolve (~7m install). 2. Next.js 16.1.6's Turbopack production build can't infer the workspace root because /app/bun.lock doesn't exist in the builder stage: Error: We couldn't find the Next.js package (next/package.json) from the project directory: /app/apps/sim This blocks the build entirely. Fix: - deps stage: use the full bun.lock from /app/bun.lock (the original lockfile after `COPY . .` in pruner) instead of the broken /app/out/bun.lock that turbo prune emits. - builder stage: also copy the full bun.lock to /app/bun.lock so Turbopack and turborepo can detect the workspace root. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * chore(ci): bump deprecated Node.js 20 actions to Node.js 24 versions GitHub Actions runners emit deprecation warnings for actions still on the Node.js 20 runtime. Node.js 20 will be force-upgraded by GitHub on 2026-06-02 and removed on 2026-09-16. Bumps to the latest stable major versions, all of which use Node.js 24: - actions/cache: v4 -> v5 - actions/setup-node: v4 -> v6 - aws-actions/configure-aws-credentials: v4 -> v6 - docker/login-action: v3 -> v4 All require GHA runner v2.327.1+ which Blacksmith already runs. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 6a7d5ae commit ceb7d20

9 files changed

Lines changed: 36 additions & 26 deletions

File tree

.github/workflows/ci.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
uses: actions/checkout@v4
7171

7272
- name: Configure AWS credentials
73-
uses: aws-actions/configure-aws-credentials@v4
73+
uses: aws-actions/configure-aws-credentials@v6
7474
with:
7575
role-to-assume: ${{ secrets.DEV_AWS_ROLE_TO_ASSUME }}
7676
aws-region: ${{ secrets.DEV_AWS_REGION }}
@@ -80,7 +80,7 @@ jobs:
8080
uses: aws-actions/amazon-ecr-login@v2
8181

8282
- name: Login to Docker Hub
83-
uses: docker/login-action@v3
83+
uses: docker/login-action@v4
8484
with:
8585
username: ${{ secrets.DOCKERHUB_USERNAME }}
8686
password: ${{ secrets.DOCKERHUB_TOKEN }}
@@ -135,7 +135,7 @@ jobs:
135135
uses: actions/checkout@v6
136136

137137
- name: Configure AWS credentials
138-
uses: aws-actions/configure-aws-credentials@v4
138+
uses: aws-actions/configure-aws-credentials@v6
139139
with:
140140
role-to-assume: ${{ github.ref == 'refs/heads/main' && secrets.AWS_ROLE_TO_ASSUME || secrets.STAGING_AWS_ROLE_TO_ASSUME }}
141141
aws-region: ${{ github.ref == 'refs/heads/main' && secrets.AWS_REGION || secrets.STAGING_AWS_REGION }}
@@ -145,14 +145,14 @@ jobs:
145145
uses: aws-actions/amazon-ecr-login@v2
146146

147147
- name: Login to Docker Hub
148-
uses: docker/login-action@v3
148+
uses: docker/login-action@v4
149149
with:
150150
username: ${{ secrets.DOCKERHUB_USERNAME }}
151151
password: ${{ secrets.DOCKERHUB_TOKEN }}
152152

153153
- name: Login to GHCR
154154
if: github.ref == 'refs/heads/main'
155-
uses: docker/login-action@v3
155+
uses: docker/login-action@v4
156156
with:
157157
registry: ghcr.io
158158
username: ${{ github.repository_owner }}
@@ -234,7 +234,7 @@ jobs:
234234
uses: actions/checkout@v6
235235

236236
- name: Login to GHCR
237-
uses: docker/login-action@v3
237+
uses: docker/login-action@v4
238238
with:
239239
registry: ghcr.io
240240
username: ${{ github.repository_owner }}
@@ -286,7 +286,7 @@ jobs:
286286

287287
steps:
288288
- name: Login to GHCR
289-
uses: docker/login-action@v3
289+
uses: docker/login-action@v4
290290
with:
291291
registry: ghcr.io
292292
username: ${{ github.repository_owner }}

.github/workflows/docs-embeddings.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ jobs:
2323
bun-version: 1.3.13
2424

2525
- name: Setup Node
26-
uses: actions/setup-node@v4
26+
uses: actions/setup-node@v6
2727
with:
2828
node-version: latest
2929

3030
- name: Cache Bun dependencies
31-
uses: actions/cache@v4
31+
uses: actions/cache@v5
3232
with:
3333
path: |
3434
~/.bun/install/cache

.github/workflows/i18n.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
bun-version: 1.3.13
2727

2828
- name: Cache Bun dependencies
29-
uses: actions/cache@v4
29+
uses: actions/cache@v5
3030
with:
3131
path: |
3232
~/.bun/install/cache
@@ -125,7 +125,7 @@ jobs:
125125
bun-version: 1.3.13
126126

127127
- name: Cache Bun dependencies
128-
uses: actions/cache@v4
128+
uses: actions/cache@v5
129129
with:
130130
path: |
131131
~/.bun/install/cache

.github/workflows/images.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
uses: actions/checkout@v6
3535

3636
- name: Configure AWS credentials
37-
uses: aws-actions/configure-aws-credentials@v4
37+
uses: aws-actions/configure-aws-credentials@v6
3838
with:
3939
role-to-assume: ${{ github.ref == 'refs/heads/main' && secrets.AWS_ROLE_TO_ASSUME || github.ref == 'refs/heads/dev' && secrets.DEV_AWS_ROLE_TO_ASSUME || secrets.STAGING_AWS_ROLE_TO_ASSUME }}
4040
aws-region: ${{ github.ref == 'refs/heads/main' && secrets.AWS_REGION || github.ref == 'refs/heads/dev' && secrets.DEV_AWS_REGION || secrets.STAGING_AWS_REGION }}
@@ -44,14 +44,14 @@ jobs:
4444
uses: aws-actions/amazon-ecr-login@v2
4545

4646
- name: Login to Docker Hub
47-
uses: docker/login-action@v3
47+
uses: docker/login-action@v4
4848
with:
4949
username: ${{ secrets.DOCKERHUB_USERNAME }}
5050
password: ${{ secrets.DOCKERHUB_TOKEN }}
5151

5252
- name: Login to GHCR
5353
if: github.ref == 'refs/heads/main'
54-
uses: docker/login-action@v3
54+
uses: docker/login-action@v4
5555
with:
5656
registry: ghcr.io
5757
username: ${{ github.repository_owner }}
@@ -120,7 +120,7 @@ jobs:
120120
uses: actions/checkout@v6
121121

122122
- name: Login to GHCR
123-
uses: docker/login-action@v3
123+
uses: docker/login-action@v4
124124
with:
125125
registry: ghcr.io
126126
username: ${{ github.repository_owner }}
@@ -160,7 +160,7 @@ jobs:
160160

161161
steps:
162162
- name: Login to GHCR
163-
uses: docker/login-action@v3
163+
uses: docker/login-action@v4
164164
with:
165165
registry: ghcr.io
166166
username: ${{ github.repository_owner }}

.github/workflows/migrations.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
bun-version: 1.3.13
2323

2424
- name: Cache Bun dependencies
25-
uses: actions/cache@v4
25+
uses: actions/cache@v5
2626
with:
2727
path: |
2828
~/.bun/install/cache

.github/workflows/publish-cli.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ jobs:
2222
bun-version: 1.3.13
2323

2424
- name: Setup Node.js for npm publishing
25-
uses: actions/setup-node@v4
25+
uses: actions/setup-node@v6
2626
with:
2727
node-version: '18'
2828
registry-url: 'https://registry.npmjs.org/'
2929

3030
- name: Cache Bun dependencies
31-
uses: actions/cache@v4
31+
uses: actions/cache@v5
3232
with:
3333
path: |
3434
~/.bun/install/cache

.github/workflows/publish-ts-sdk.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ jobs:
2222
bun-version: 1.3.13
2323

2424
- name: Setup Node.js for npm publishing
25-
uses: actions/setup-node@v4
25+
uses: actions/setup-node@v6
2626
with:
2727
node-version: '22'
2828
registry-url: 'https://registry.npmjs.org/'
2929

3030
- name: Cache Bun dependencies
31-
uses: actions/cache@v4
31+
uses: actions/cache@v5
3232
with:
3333
path: |
3434
~/.bun/install/cache

.github/workflows/test-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
bun-version: 1.3.13
2323

2424
- name: Setup Node
25-
uses: actions/setup-node@v4
25+
uses: actions/setup-node@v6
2626
with:
2727
node-version: latest
2828

@@ -45,7 +45,7 @@ jobs:
4545
path: ./.turbo
4646

4747
- name: Restore Next.js build cache
48-
uses: actions/cache@v4
48+
uses: actions/cache@v5
4949
with:
5050
path: ./apps/sim/.next/cache
5151
key: ${{ runner.os }}-nextjs-${{ hashFiles('bun.lock') }}

docker/app.Dockerfile

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,14 @@ RUN turbo prune sim --docker
2929
FROM base AS deps
3030
WORKDIR /app
3131

32-
# Pruned manifests + lockfile from the pruner stage. This layer only invalidates
33-
# when package.json/bun.lock content changes — not on source edits.
32+
# Pruned manifests from the pruner stage. This layer only invalidates when
33+
# package.json/bun.lock content changes — not on source edits.
3434
COPY --from=pruner /app/out/json/ ./
35-
COPY --from=pruner /app/out/bun.lock ./bun.lock
35+
# Use the full bun.lock (not the pruned out/bun.lock). turbo prune emits a
36+
# bun.lock that bun 1.3.x rejects with "Failed to resolve prod dependency",
37+
# forcing a slow fresh resolve. The full lockfile parses cleanly and bun
38+
# only installs what the pruned package.jsons reference.
39+
COPY --from=pruner /app/bun.lock ./bun.lock
3640

3741
# Install all dependencies (including devDependencies — tailwindcss/postcss are
3842
# devDeps but required at build time). Then rebuild isolated-vm against Node.js.
@@ -55,6 +59,12 @@ COPY --from=deps /app/node_modules ./node_modules
5559
# Copy pruned source tree (apps/sim + workspace packages it depends on)
5660
COPY --from=pruner /app/out/full/ ./
5761

62+
# Next.js 16 / Turbopack workspace-root detection looks for a lockfile next to
63+
# the workspace package.json. Without it, `next build` fails with
64+
# "couldn't find next/package.json from /app/apps/sim". turbo also warns
65+
# "Lockfile not found at /app/bun.lock" without it.
66+
COPY --from=pruner /app/bun.lock ./bun.lock
67+
5868
ENV NEXT_TELEMETRY_DISABLED=1 \
5969
VERCEL_TELEMETRY_DISABLED=1 \
6070
DOCKER_BUILD=1

0 commit comments

Comments
 (0)