Skip to content

Commit

Permalink
fix(build): corepackのバグの回避
Browse files Browse the repository at this point in the history
Cherry-picked from misskey-dev/misskey#15387

# Conflicts:
#	.github/workflows/api-cherrypick-js.yml
#	.github/workflows/test-backend.yml
#	.github/workflows/test-cherrypick-js.yml
#	.github/workflows/test-frontend.yml
#	CHANGELOG.md

Co-authored-by: かっこかり <[email protected]>
Co-authored-by: Marie <[email protected]>
Co-authored-by: anatawa12 <[email protected]>
  • Loading branch information
4 people committed Feb 5, 2025
1 parent 0ffca37 commit db13828
Show file tree
Hide file tree
Showing 16 changed files with 61 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/api-cherrypick-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
paths:
- packages/cherrypick-js/**
- .github/workflows/api-cherrypick-js.yml

env:
COREPACK_DEFAULT_TO_LATEST: 0

jobs:
report:

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/get-api-diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
paths:
- packages/backend/**
- .github/workflows/get-api-diff.yml

env:
COREPACK_DEFAULT_TO_LATEST: 0

jobs:
get-from-cherrypick:
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ on:
- packages/misskey-reversi/**
- packages/shared/eslint.config.js
- .github/workflows/lint.yml

env:
COREPACK_DEFAULT_TO_LATEST: 0

jobs:
pnpm_install:
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/locale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
paths:
- locales/**
- .github/workflows/locale.yml

env:
COREPACK_DEFAULT_TO_LATEST: 0

jobs:
locale_verify:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/on-release-created.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:

workflow_dispatch:

env:
COREPACK_DEFAULT_TO_LATEST: 0

jobs:
publish-cherrypick-js:
name: Publish cherrypick-js
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ on:
# This is a waste of chromatic build quota, so we don't run storybook CI on pull requests targets master.
- master

env:
COREPACK_DEFAULT_TO_LATEST: 0

jobs:
build:
runs-on: ubuntu-latest
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 @@ -18,6 +18,10 @@ on:
- packages/cherrypick-js/**
- .github/workflows/test-backend.yml
- .github/cherrypick/test*.yml

env:
COREPACK_DEFAULT_TO_LATEST: 0

jobs:
unit:
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-cherrypick-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ on:
paths:
- packages/cherrypick-js/**
- .github/workflows/test-cherrypick-js.yml

env:
COREPACK_DEFAULT_TO_LATEST: 0

jobs:
test:

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/test-federation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ on:
- packages/cherrypick-js/**
- .github/workflows/test-federation.yml

env:
COREPACK_DEFAULT_TO_LATEST: 0

jobs:
test:
runs-on: ubuntu-latest
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 @@ -20,6 +20,10 @@ on:
# for e2e
- packages/backend/**
- .github/workflows/test-frontend.yml

env:
COREPACK_DEFAULT_TO_LATEST: 0

jobs:
vitest:
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:

env:
NODE_ENV: production
COREPACK_DEFAULT_TO_LATEST: 0

jobs:
production:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/validate-api-json.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
paths:
- packages/backend/**
- .github/workflows/validate-api-json.yml

env:
COREPACK_DEFAULT_TO_LATEST: 0

jobs:
validate-api-json:
runs-on: ubuntu-latest
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG_YOJO.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## 1.3.1
Cherrypick 4.13.0
Misskey 2024.10.1

### Release Date

### General
- Fix: Docker のビルドに失敗する問題を修正
(Cherry-picked from https://github.com/misskey-dev/misskey/pull/15387)

## 1.3.0
Cherrypick 4.13.0
Misskey 2024.10.1
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=20.16.0-bullseye

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
1 change: 1 addition & 0 deletions packages/backend/test-federation/compose.tpl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ services:
- ./.config/docker.env
environment:
- NODE_ENV=production
- COREPACK_DEFAULT_TO_LATEST=0
volumes:
- type: bind
source: ../../../built
Expand Down
3 changes: 3 additions & 0 deletions packages/backend/test-federation/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ services:
environment:
- NODE_ENV=development
- NODE_EXTRA_CA_CERTS=/usr/local/share/ca-certificates/rootCA.crt
- COREPACK_DEFAULT_TO_LATEST=0
volumes:
- type: bind
source: ../package.json
Expand Down Expand Up @@ -85,6 +86,8 @@ services:
depends_on:
redis.test:
condition: service_healthy
environment:
- COREPACK_DEFAULT_TO_LATEST=0
volumes:
- type: bind
source: ../package.json
Expand Down

0 comments on commit db13828

Please sign in to comment.