diff --git a/.github/workflows/auto_close_prs.yml b/.github/workflows/auto-close-prs.yml similarity index 100% rename from .github/workflows/auto_close_prs.yml rename to .github/workflows/auto-close-prs.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d0607e61c5..d5cb5dfcc8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,17 +24,17 @@ jobs: - uses: actions/checkout@v5 - name: Enable Corepack run: corepack enable - - name: Use Node.js 22.x + - name: Use Node.js 24.x uses: actions/setup-node@v5 with: - node-version: 22.x + node-version: 24.x cache: "yarn" - name: Cache node_modules id: cache-node-modules uses: actions/cache@v4 with: path: node_modules - key: ${{ runner.os }}-node-modules-${{ hashFiles('yarn.lock') }} + key: ${{ runner.os }}-node-modules-24.x-${{ hashFiles('yarn.lock') }} - name: Install dependencies if: steps.cache-node-modules.outputs.cache-hit != 'true' run: yarn install --immutable @@ -48,13 +48,13 @@ jobs: run: corepack enable - uses: actions/setup-node@v5 with: - node-version: 22.x + node-version: 24.x cache: "yarn" - name: Restore node_modules uses: actions/cache@v4 with: path: node_modules - key: ${{ runner.os }}-node-modules-${{ hashFiles('yarn.lock') }} + key: ${{ runner.os }}-node-modules-24.x-${{ hashFiles('yarn.lock') }} - run: yarn lint --quiet types: @@ -66,13 +66,13 @@ jobs: run: corepack enable - uses: actions/setup-node@v5 with: - node-version: 22.x + node-version: 24.x cache: "yarn" - name: Restore node_modules uses: actions/cache@v4 with: path: node_modules - key: ${{ runner.os }}-node-modules-${{ hashFiles('yarn.lock') }} + key: ${{ runner.os }}-node-modules-24.x-${{ hashFiles('yarn.lock') }} - run: yarn tsc changes: @@ -114,13 +114,13 @@ jobs: run: corepack enable - uses: actions/setup-node@v5 with: - node-version: 22.x + node-version: 24.x cache: "yarn" - name: Restore node_modules uses: actions/cache@v4 with: path: node_modules - key: ${{ runner.os }}-node-modules-${{ hashFiles('yarn.lock') }} + key: ${{ runner.os }}-node-modules-24.x-${{ hashFiles('yarn.lock') }} - run: yarn test:${{ matrix.test-group }} test-server: @@ -152,13 +152,13 @@ jobs: run: corepack enable - uses: actions/setup-node@v5 with: - node-version: 22.x + node-version: 24.x cache: "yarn" - name: Restore node_modules uses: actions/cache@v4 with: path: node_modules - key: ${{ runner.os }}-node-modules-${{ hashFiles('yarn.lock') }} + key: ${{ runner.os }}-node-modules-24.x-${{ hashFiles('yarn.lock') }} - run: yarn sequelize db:migrate - name: Run server tests run: | @@ -175,13 +175,13 @@ jobs: run: corepack enable - uses: actions/setup-node@v5 with: - node-version: 22.x + node-version: 24.x cache: "yarn" - name: Restore node_modules uses: actions/cache@v4 with: path: node_modules - key: ${{ runner.os }}-node-modules-${{ hashFiles('yarn.lock') }} + key: ${{ runner.os }}-node-modules-24.x-${{ hashFiles('yarn.lock') }} - name: Set environment to production run: echo "NODE_ENV=production" >> $GITHUB_ENV - run: yarn vite:build diff --git a/.github/workflows/docker-build-check.yml b/.github/workflows/docker-build-check.yml new file mode 100644 index 0000000000..97b6709be5 --- /dev/null +++ b/.github/workflows/docker-build-check.yml @@ -0,0 +1,43 @@ +name: Docker Build Check + +on: + push: + paths: + - "Dockerfile" + - "Dockerfile.base" + pull_request: + paths: + - "Dockerfile" + - "Dockerfile.base" + +env: + BASE_IMAGE_NAME: outline-base + +jobs: + build: + runs-on: ubicloud-standard-8 + steps: + - name: Checkout + uses: actions/checkout@v5 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + with: + driver: docker + + - name: Build base image + uses: docker/build-push-action@v6 + with: + context: . + file: Dockerfile.base + tags: ${{ env.BASE_IMAGE_NAME }}:latest + push: false + + - name: Build main image + uses: docker/build-push-action@v6 + with: + context: . + file: Dockerfile + push: false + build-args: | + BASE_IMAGE=${{ env.BASE_IMAGE_NAME }}:latest diff --git a/.nvmrc b/.nvmrc index 2bd5a0a98a..a45fd52cc5 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -22 +24 diff --git a/Dockerfile b/Dockerfile index e313b46fc0..fdec598be7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ ARG APP_PATH WORKDIR $APP_PATH # --- -FROM node:22.21.0-slim AS runner +FROM node:24.14.1-slim AS runner LABEL org.opencontainers.image.source="https://github.com/outline/outline" diff --git a/Dockerfile.base b/Dockerfile.base index 910a55e7a9..2a93c8b084 100644 --- a/Dockerfile.base +++ b/Dockerfile.base @@ -1,5 +1,5 @@ ARG APP_PATH=/opt/outline -FROM node:22.21.0 AS deps +FROM node:24.14.1 AS deps ARG APP_PATH WORKDIR $APP_PATH diff --git a/package.json b/package.json index ee169b0bc7..2640c09318 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "url": "https://github.com/sponsors/outline" }, "engines": { - "node": ">=20.12 <21 || 22" + "node": ">=20.12 <21 || 22 || 24" }, "repository": { "type": "git",