Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(build): corepackのバグの回避 #15387

Merged
merged 10 commits into from
Feb 3, 2025
2 changes: 2 additions & 0 deletions .github/workflows/api-misskey-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
uses: actions/[email protected]

- run: corepack enable
env:
anatawa12 marked this conversation as resolved.
Show resolved Hide resolved
COREPACK_DEFAULT_TO_LATEST: 0

- name: Setup Node.js
uses: actions/[email protected]
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/get-api-diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ jobs:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- run: corepack enable
env:
COREPACK_DEFAULT_TO_LATEST: 0
- run: pnpm i --frozen-lockfile
- name: Check pnpm-lock.yaml
run: git diff --exit-code pnpm-lock.yaml
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ jobs:
node-version-file: '.node-version'
cache: 'pnpm'
- run: corepack enable
env:
COREPACK_DEFAULT_TO_LATEST: 0
- run: pnpm i --frozen-lockfile

lint:
Expand Down Expand Up @@ -73,6 +75,8 @@ jobs:
node-version-file: '.node-version'
cache: 'pnpm'
- run: corepack enable
env:
COREPACK_DEFAULT_TO_LATEST: 0
- run: pnpm i --frozen-lockfile
- name: Restore eslint cache
uses: actions/[email protected]
Expand Down Expand Up @@ -103,6 +107,8 @@ jobs:
node-version-file: '.node-version'
cache: 'pnpm'
- run: corepack enable
env:
COREPACK_DEFAULT_TO_LATEST: 0
- run: pnpm i --frozen-lockfile
- run: pnpm --filter misskey-js run build
if: ${{ matrix.workspace == 'backend' || matrix.workspace == 'sw' }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/locale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,7 @@ jobs:
node-version-file: '.node-version'
cache: 'pnpm'
- run: corepack enable
env:
COREPACK_DEFAULT_TO_LATEST: 0
- run: pnpm i --frozen-lockfile
- run: cd locales && node verify.js
1 change: 1 addition & 0 deletions .github/workflows/on-release-created.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,6 @@ jobs:
pnpm build
pnpm --filter misskey-js publish --access public --no-git-checks --provenance
env:
COREPACK_DEFAULT_TO_LATEST: 0
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
NPM_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
2 changes: 2 additions & 0 deletions .github/workflows/storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ jobs:
node-version-file: '.node-version'
cache: 'pnpm'
- run: corepack enable
env:
COREPACK_DEFAULT_TO_LATEST: 0
- run: pnpm i --frozen-lockfile
- name: Check pnpm-lock.yaml
run: git diff --exit-code pnpm-lock.yaml
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ jobs:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- run: corepack enable
env:
COREPACK_DEFAULT_TO_LATEST: 0
- run: pnpm i --frozen-lockfile
- name: Check pnpm-lock.yaml
run: git diff --exit-code pnpm-lock.yaml
Expand Down Expand Up @@ -115,6 +117,8 @@ jobs:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- run: corepack enable
env:
COREPACK_DEFAULT_TO_LATEST: 0
- run: pnpm i --frozen-lockfile
- name: Check pnpm-lock.yaml
run: git diff --exit-code pnpm-lock.yaml
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test-federation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ jobs:
corepack enable && corepack prepare
pnpm i --frozen-lockfile
pnpm build
env:
COREPACK_DEFAULT_TO_LATEST: 0
- name: Setup
run: |
cd packages/backend/test-federation
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ jobs:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- run: corepack enable
env:
COREPACK_DEFAULT_TO_LATEST: 0
- run: pnpm i --frozen-lockfile
- name: Check pnpm-lock.yaml
run: git diff --exit-code pnpm-lock.yaml
Expand Down Expand Up @@ -99,6 +101,8 @@ jobs:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- run: corepack enable
env:
COREPACK_DEFAULT_TO_LATEST: 0
- run: pnpm i --frozen-lockfile
- name: Copy Configure
run: cp .github/misskey/test.yml .config
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test-misskey-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ jobs:
uses: actions/[email protected]

- run: corepack enable
env:
COREPACK_DEFAULT_TO_LATEST: 0

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/[email protected]
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ jobs:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- run: corepack enable
env:
COREPACK_DEFAULT_TO_LATEST: 0
- run: pnpm i --frozen-lockfile
- name: Check pnpm-lock.yaml
run: git diff --exit-code pnpm-lock.yaml
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/validate-api-json.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ jobs:
- name: Install Redocly CLI
run: npm i -g @redocly/cli
- run: corepack enable
env:
COREPACK_DEFAULT_TO_LATEST: 0
- run: pnpm i --frozen-lockfile
- name: Check pnpm-lock.yaml
run: git diff --exit-code pnpm-lock.yaml
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
## 2025.2.0

### General
-
- Fix: Docker のビルドに失敗する問題を修正
(Cherry-picked from https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/883)

### Client
- Fix: 一部環境でセンシティブなファイルを含むノートの非表示が効かない問題
Expand Down
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ ARG NODE_VERSION=22.11.0-bookworm

FROM --platform=$BUILDPLATFORM node:${NODE_VERSION} AS native-builder

ENV COREPACK_DEFAULT_TO_LATEST=0

RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
rm -f /etc/apt/apt.conf.d/docker-clean \
Expand Down Expand Up @@ -44,6 +46,8 @@ RUN rm -rf .git/

FROM --platform=$TARGETPLATFORM node:${NODE_VERSION} AS target-builder

ENV COREPACK_DEFAULT_TO_LATEST=0

RUN apt-get update \
&& apt-get install -yqq --no-install-recommends \
build-essential
Expand All @@ -68,6 +72,7 @@ FROM --platform=$TARGETPLATFORM node:${NODE_VERSION}-slim AS runner

ARG UID="991"
ARG GID="991"
ENV COREPACK_DEFAULT_TO_LATEST=0

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
Expand Down
Loading