mirror of
https://github.com/RayLabsHQ/gitea-mirror.git
synced 2025-12-06 03:26:44 +03:00
Update Docker and workflow configurations for bun.lock handling
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
|
||||
# Node.js
|
||||
node_modules
|
||||
bun.lock
|
||||
# We don't exclude bun.lock* as it's needed for the build
|
||||
npm-debug.log
|
||||
yarn-debug.log
|
||||
yarn-error.log
|
||||
|
||||
15
.github/workflows/astro-build-test.yml
vendored
15
.github/workflows/astro-build-test.yml
vendored
@@ -16,7 +16,7 @@ jobs:
|
||||
build-and-test:
|
||||
name: Build and Test Astro Project
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
@@ -25,10 +25,17 @@ jobs:
|
||||
uses: oven-sh/setup-bun@v1
|
||||
with:
|
||||
bun-version: '1.2.9'
|
||||
cache: true
|
||||
|
||||
- name: Install dependencies
|
||||
run: bun install
|
||||
- name: Check lockfile and install dependencies
|
||||
run: |
|
||||
# Check if bun.lock exists, if not check for bun.lockb
|
||||
if [ -f "bun.lock" ]; then
|
||||
echo "Using existing bun.lock file"
|
||||
elif [ -f "bun.lockb" ]; then
|
||||
echo "Found bun.lockb, creating symlink to bun.lock"
|
||||
ln -s bun.lockb bun.lock
|
||||
fi
|
||||
bun install
|
||||
|
||||
- name: Run tests
|
||||
run: bunx vitest run
|
||||
|
||||
4
.github/workflows/docker-scan.yml
vendored
4
.github/workflows/docker-scan.yml
vendored
@@ -7,14 +7,14 @@ on:
|
||||
- 'Dockerfile'
|
||||
- '.dockerignore'
|
||||
- 'package.json'
|
||||
- 'bun.lock'
|
||||
- 'bun.lock*'
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
paths:
|
||||
- 'Dockerfile'
|
||||
- '.dockerignore'
|
||||
- 'package.json'
|
||||
- 'bun.lock'
|
||||
- 'bun.lock*'
|
||||
schedule:
|
||||
- cron: '0 0 * * 0' # Run weekly on Sunday at midnight
|
||||
|
||||
|
||||
@@ -6,7 +6,8 @@ RUN apk add --no-cache libc6-compat python3 make g++ gcc wget sqlite
|
||||
|
||||
# ----------------------------
|
||||
FROM base AS deps
|
||||
COPY package.json bun.lock ./
|
||||
COPY package.json ./
|
||||
COPY bun.lock* ./
|
||||
RUN bun install --frozen-lockfile
|
||||
|
||||
# ----------------------------
|
||||
|
||||
Reference in New Issue
Block a user