Skip to content

Commit 16bee7a

Browse files
kakkokari-gtyihMar0xyanatawa12
authored andcommitted
fix(build): corepackのバグの回避 (misskey-dev#15387)
* fix: disallow corepack from fetching latest manager version instead use specified version in package.json * Update Changelog * fix? * apply COREPACK_DEFAULT_TO_LATEST: 0 to every github workflows * Revert "apply COREPACK_DEFAULT_TO_LATEST: 0 to every github workflows" This reverts commit 67f0dc3. * apply COREPACK_DEFAULT_TO_LATEST: 0 to every github workflows (re) * fix * fix? * revert: removing corepack enable * test: set COREPACK_DEFAULT_TO_LATEST for federation tests --------- Co-authored-by: Marie <[email protected]> Co-authored-by: anatawa12 <[email protected]>
1 parent 2442ba7 commit 16bee7a

16 files changed

+54
-1
lines changed

.github/workflows/api-misskey-js.yml

+4
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ on:
99
paths:
1010
- packages/misskey-js/**
1111
- .github/workflows/api-misskey-js.yml
12+
13+
env:
14+
COREPACK_DEFAULT_TO_LATEST: 0
15+
1216
jobs:
1317
report:
1418

.github/workflows/get-api-diff.yml

+4
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ on:
99
paths:
1010
- packages/backend/**
1111
- .github/workflows/get-api-diff.yml
12+
13+
env:
14+
COREPACK_DEFAULT_TO_LATEST: 0
15+
1216
jobs:
1317
get-from-misskey:
1418
runs-on: ubuntu-latest

.github/workflows/lint.yml

+4
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ on:
2828
- packages/misskey-reversi/**
2929
- packages/shared/eslint.config.js
3030
- .github/workflows/lint.yml
31+
32+
env:
33+
COREPACK_DEFAULT_TO_LATEST: 0
34+
3135
jobs:
3236
pnpm_install:
3337
runs-on: ubuntu-latest

.github/workflows/locale.yml

+4
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ on:
99
paths:
1010
- locales/**
1111
- .github/workflows/locale.yml
12+
13+
env:
14+
COREPACK_DEFAULT_TO_LATEST: 0
15+
1216
jobs:
1317
locale_verify:
1418
runs-on: ubuntu-latest

.github/workflows/on-release-created.yml

+3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66

77
workflow_dispatch:
88

9+
env:
10+
COREPACK_DEFAULT_TO_LATEST: 0
11+
912
jobs:
1013
publish-misskey-js:
1114
name: Publish misskey-js

.github/workflows/storybook.yml

+3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ on:
1313
# This is a waste of chromatic build quota, so we don't run storybook CI on pull requests targets master.
1414
- master
1515

16+
env:
17+
COREPACK_DEFAULT_TO_LATEST: 0
18+
1619
jobs:
1720
build:
1821
# chromatic is not likely to be available for fork repositories, so we disable for fork repositories.

.github/workflows/test-backend.yml

+5
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ on:
1616
# for permissions
1717
- packages/misskey-js/**
1818
- .github/workflows/test-backend.yml
19+
- .github/misskey/test.yml
20+
21+
env:
22+
COREPACK_DEFAULT_TO_LATEST: 0
23+
1924
jobs:
2025
unit:
2126
runs-on: ubuntu-latest

.github/workflows/test-federation.yml

+3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ on:
1515
- packages/misskey-js/**
1616
- .github/workflows/test-federation.yml
1717

18+
env:
19+
COREPACK_DEFAULT_TO_LATEST: 0
20+
1821
jobs:
1922
test:
2023
runs-on: ubuntu-latest

.github/workflows/test-frontend.yml

+4
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ on:
2020
# for e2e
2121
- packages/backend/**
2222
- .github/workflows/test-frontend.yml
23+
24+
env:
25+
COREPACK_DEFAULT_TO_LATEST: 0
26+
2327
jobs:
2428
vitest:
2529
runs-on: ubuntu-latest

.github/workflows/test-misskey-js.yml

+4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ on:
1414
paths:
1515
- packages/misskey-js/**
1616
- .github/workflows/test-misskey-js.yml
17+
18+
env:
19+
COREPACK_DEFAULT_TO_LATEST: 0
20+
1721
jobs:
1822
test:
1923

.github/workflows/test-production.yml

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99

1010
env:
1111
NODE_ENV: production
12+
COREPACK_DEFAULT_TO_LATEST: 0
1213

1314
jobs:
1415
production:

.github/workflows/validate-api-json.yml

+4
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ on:
1212
paths:
1313
- packages/backend/**
1414
- .github/workflows/validate-api-json.yml
15+
16+
env:
17+
COREPACK_DEFAULT_TO_LATEST: 0
18+
1519
jobs:
1620
validate-api-json:
1721
runs-on: ubuntu-latest

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
## 2024.11.1
22

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

67
### Client
78
- Enhance: PC画面でチャンネルが複数列で表示されるように

Dockerfile

+5
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ ARG NODE_VERSION=22.11.0-bookworm
66

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

9+
ENV COREPACK_DEFAULT_TO_LATEST=0
10+
911
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
1012
--mount=type=cache,target=/var/lib/apt,sharing=locked \
1113
rm -f /etc/apt/apt.conf.d/docker-clean \
@@ -44,6 +46,8 @@ RUN rm -rf .git/
4446

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

49+
ENV COREPACK_DEFAULT_TO_LATEST=0
50+
4751
RUN apt-get update \
4852
&& apt-get install -yqq --no-install-recommends \
4953
build-essential
@@ -68,6 +72,7 @@ FROM --platform=$TARGETPLATFORM node:${NODE_VERSION}-slim AS runner
6872

6973
ARG UID="991"
7074
ARG GID="991"
75+
ENV COREPACK_DEFAULT_TO_LATEST=0
7176

7277
RUN apt-get update \
7378
&& apt-get install -y --no-install-recommends \

packages/backend/test-federation/compose.tpl.yml

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ services:
1717
- ./.config/docker.env
1818
environment:
1919
- NODE_ENV=production
20+
- COREPACK_DEFAULT_TO_LATEST=0
2021
volumes:
2122
- type: bind
2223
source: ../../../built

packages/backend/test-federation/compose.yml

+3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ services:
2525
environment:
2626
- NODE_ENV=development
2727
- NODE_EXTRA_CA_CERTS=/usr/local/share/ca-certificates/rootCA.crt
28+
- COREPACK_DEFAULT_TO_LATEST=0
2829
volumes:
2930
- type: bind
3031
source: ../package.json
@@ -85,6 +86,8 @@ services:
8586
depends_on:
8687
redis.test:
8788
condition: service_healthy
89+
environment:
90+
- COREPACK_DEFAULT_TO_LATEST=0
8891
volumes:
8992
- type: bind
9093
source: ../package.json

0 commit comments

Comments
 (0)