Skip to content

Commit cad72da

Browse files
committed
Update Docker and workflow configurations for bun.lock handling
1 parent 4a01a35 commit cad72da

File tree

4 files changed

+16
-8
lines changed

4 files changed

+16
-8
lines changed

.dockerignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
# Node.js
77
node_modules
8-
bun.lock
8+
# We don't exclude bun.lock* as it's needed for the build
99
npm-debug.log
1010
yarn-debug.log
1111
yarn-error.log

.github/workflows/astro-build-test.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
build-and-test:
1717
name: Build and Test Astro Project
1818
runs-on: ubuntu-latest
19-
19+
2020
steps:
2121
- name: Checkout repository
2222
uses: actions/checkout@v4
@@ -25,10 +25,17 @@ jobs:
2525
uses: oven-sh/setup-bun@v1
2626
with:
2727
bun-version: '1.2.9'
28-
cache: true
2928

30-
- name: Install dependencies
31-
run: bun install
29+
- name: Check lockfile and install dependencies
30+
run: |
31+
# Check if bun.lock exists, if not check for bun.lockb
32+
if [ -f "bun.lock" ]; then
33+
echo "Using existing bun.lock file"
34+
elif [ -f "bun.lockb" ]; then
35+
echo "Found bun.lockb, creating symlink to bun.lock"
36+
ln -s bun.lockb bun.lock
37+
fi
38+
bun install
3239
3340
- name: Run tests
3441
run: bunx vitest run

.github/workflows/docker-scan.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ on:
77
- 'Dockerfile'
88
- '.dockerignore'
99
- 'package.json'
10-
- 'bun.lock'
10+
- 'bun.lock*'
1111
pull_request:
1212
branches: [ main ]
1313
paths:
1414
- 'Dockerfile'
1515
- '.dockerignore'
1616
- 'package.json'
17-
- 'bun.lock'
17+
- 'bun.lock*'
1818
schedule:
1919
- cron: '0 0 * * 0' # Run weekly on Sunday at midnight
2020

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ RUN apk add --no-cache libc6-compat python3 make g++ gcc wget sqlite
66

77
# ----------------------------
88
FROM base AS deps
9-
COPY package.json bun.lock ./
9+
COPY package.json ./
10+
COPY bun.lock* ./
1011
RUN bun install --frozen-lockfile
1112

1213
# ----------------------------

0 commit comments

Comments
 (0)