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.js
|
||||||
node_modules
|
node_modules
|
||||||
bun.lock
|
# We don't exclude bun.lock* as it's needed for the build
|
||||||
npm-debug.log
|
npm-debug.log
|
||||||
yarn-debug.log
|
yarn-debug.log
|
||||||
yarn-error.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:
|
build-and-test:
|
||||||
name: Build and Test Astro Project
|
name: Build and Test Astro Project
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -25,10 +25,17 @@ jobs:
|
|||||||
uses: oven-sh/setup-bun@v1
|
uses: oven-sh/setup-bun@v1
|
||||||
with:
|
with:
|
||||||
bun-version: '1.2.9'
|
bun-version: '1.2.9'
|
||||||
cache: true
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Check lockfile and install dependencies
|
||||||
run: bun install
|
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
|
- name: Run tests
|
||||||
run: bunx vitest run
|
run: bunx vitest run
|
||||||
|
|||||||
4
.github/workflows/docker-scan.yml
vendored
4
.github/workflows/docker-scan.yml
vendored
@@ -7,14 +7,14 @@ on:
|
|||||||
- 'Dockerfile'
|
- 'Dockerfile'
|
||||||
- '.dockerignore'
|
- '.dockerignore'
|
||||||
- 'package.json'
|
- 'package.json'
|
||||||
- 'bun.lock'
|
- 'bun.lock*'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ main ]
|
branches: [ main ]
|
||||||
paths:
|
paths:
|
||||||
- 'Dockerfile'
|
- 'Dockerfile'
|
||||||
- '.dockerignore'
|
- '.dockerignore'
|
||||||
- 'package.json'
|
- 'package.json'
|
||||||
- 'bun.lock'
|
- 'bun.lock*'
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 0 * * 0' # Run weekly on Sunday at midnight
|
- 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
|
FROM base AS deps
|
||||||
COPY package.json bun.lock ./
|
COPY package.json ./
|
||||||
|
COPY bun.lock* ./
|
||||||
RUN bun install --frozen-lockfile
|
RUN bun install --frozen-lockfile
|
||||||
|
|
||||||
# ----------------------------
|
# ----------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user