Skip to content

Commit

Permalink
Merge remote-tracking branch 'anatawa12/vmimi-relay-timeline/generic'…
Browse files Browse the repository at this point in the history
… into vmimi-relay-timeline/forks/nirila
  • Loading branch information
anatawa12 committed Jul 31, 2024
2 parents 23cf138 + 18ebf1c commit 9fdb174
Show file tree
Hide file tree
Showing 594 changed files with 23,455 additions and 9,839 deletions.
6 changes: 6 additions & 0 deletions .config/docker_example.env
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# misskey settings
# MISSKEY_URL=https://example.tld/

# db settings
POSTGRES_PASSWORD=example-misskey-pass
# DATABASE_PASSWORD=${POSTGRES_PASSWORD}
POSTGRES_USER=example-misskey-user
# DATABASE_USER=${POSTGRES_USER}
POSTGRES_DB=misskey
# DATABASE_DB=${POSTGRES_DB}
DATABASE_URL="postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}"
3 changes: 3 additions & 0 deletions .config/docker_example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#───┘ URL └─────────────────────────────────────────────────────

# Final accessible URL seen by a user.
# You can set url from an environment variable instead.
url: https://example.tld/

# ONCE YOU HAVE STARTED THE INSTANCE, DO NOT CHANGE THE
Expand Down Expand Up @@ -38,9 +39,11 @@ db:
port: 5432

# Database name
# You can set db from an environment variable instead.
db: misskey

# Auth
# You can set user and pass from environment variables instead.
user: example-misskey-user
pass: example-misskey-pass

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3.8'

services:
app:
build:
Expand All @@ -8,6 +6,7 @@ services:

volumes:
- ../:/workspace:cached
- node_modules:/workspace/node_modules

command: sleep infinity

Expand Down Expand Up @@ -46,6 +45,7 @@ services:
volumes:
postgres-data:
redis-data:
node_modules:

networks:
internal_network:
Expand Down
6 changes: 3 additions & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"name": "Misskey",
"dockerComposeFile": "docker-compose.yml",
"dockerComposeFile": "compose.yml",
"service": "app",
"workspaceFolder": "/workspace",
"features": {
"ghcr.io/devcontainers/features/node:1": {
"version": "20.12.2"
"version": "20.16.0"
},
"ghcr.io/devcontainers-contrib/features/corepack:1": {}
},
"forwardPorts": [3000],
"postCreateCommand": "sudo chmod 755 .devcontainer/init.sh && .devcontainer/init.sh",
"postCreateCommand": "/bin/bash .devcontainer/init.sh",
"customizations": {
"vscode": {
"extensions": [
Expand Down
3 changes: 2 additions & 1 deletion .devcontainer/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

set -xe

sudo chown -R node /workspace
sudo chown node node_modules
git config --global --add safe.directory /workspace
git submodule update --init
corepack install
corepack enable
Expand Down
5 changes: 2 additions & 3 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ Dockerfile
build/
built/
db/
docker-compose.yml
.devcontainer/compose.yml
node_modules/
packages/*/node_modules
redis/
files/
misskey-assets/
fluent-emojis/
.pnp.*

Expand All @@ -28,4 +27,4 @@ fluent-emojis/

.idea/
packages/*/.vscode/
packages/backend/test/docker-compose.yml
packages/backend/test/compose.yml
5 changes: 3 additions & 2 deletions .github/workflows/api-misskey-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ on:
push:
paths:
- packages/misskey-js/**
- .github/workflows/api-misskey-js.yml
pull_request:
paths:
- packages/misskey-js/**

- .github/workflows/api-misskey-js.yml
jobs:
report:

Expand All @@ -20,7 +21,7 @@ jobs:
- run: corepack enable

- name: Setup Node.js
uses: actions/[email protected].2
uses: actions/[email protected].3
with:
node-version-file: '.node-version'
cache: 'pnpm'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/changelog-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Checkout head
uses: actions/[email protected]
- name: Setup Node.js
uses: actions/[email protected].2
uses: actions/[email protected].3
with:
node-version-file: '.node-version'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-misskey-js-autogen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:

- name: setup node
id: setup-node
uses: actions/[email protected].2
uses: actions/[email protected].3
with:
node-version-file: '.node-version'
cache: pnpm
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/check-misskey-js-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ on:
paths:
- packages/misskey-js/package.json
- package.json
- .github/workflows/check-misskey-js-version.yml
pull_request:
branches: [ develop ]
paths:
- packages/misskey-js/package.json
- package.json

- .github/workflows/check-misskey-js-version.yml
jobs:
check-version:
# ルートの package.json と packages/misskey-js/package.json のバージョンが一致しているかを確認する
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push by digest
id: build
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: .
push: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and Push to Docker Hub
id: build
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: .
push: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dockle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
sudo dpkg -i dockle.deb
- run: |
cp .config/docker_example.env .config/docker.env
cp ./docker-compose_example.yml ./docker-compose.yml
cp ./compose_example.yml ./compose.yml
- run: |
docker compose up -d web
docker tag "$(docker compose images web | awk 'OFS=":" {print $4}' | tail -n +2)" misskey-web:latest
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/get-api-diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ on:
paths:
- packages/backend/**
- .github/workflows/get-api-diff.yml

jobs:
get-from-misskey:
runs-on: ubuntu-latest
Expand All @@ -18,7 +17,7 @@ jobs:

strategy:
matrix:
node-version: [20.12.2]
node-version: [20.16.0]
api-json-name: [api-base.json, api-head.json]
include:
- api-json-name: api-base.json
Expand All @@ -34,7 +33,7 @@ jobs:
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/[email protected].2
uses: actions/[email protected].3
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
Expand Down
24 changes: 17 additions & 7 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@ on:
- packages/frontend/**
- packages/sw/**
- packages/misskey-js/**
- packages/shared/.eslintrc.js
- packages/shared/eslint.config.js
- .github/workflows/lint.yml
pull_request:
paths:
- packages/backend/**
- packages/frontend/**
- packages/sw/**
- packages/misskey-js/**
- packages/shared/.eslintrc.js

- packages/shared/eslint.config.js
- .github/workflows/lint.yml
jobs:
pnpm_install:
runs-on: ubuntu-latest
Expand All @@ -28,7 +29,7 @@ jobs:
fetch-depth: 0
submodules: true
- uses: pnpm/action-setup@v4
- uses: actions/[email protected].2
- uses: actions/[email protected].3
with:
node-version-file: '.node-version'
cache: 'pnpm'
Expand All @@ -39,6 +40,8 @@ jobs:
needs: [pnpm_install]
runs-on: ubuntu-latest
continue-on-error: true
env:
eslint-cache-version: v1
strategy:
matrix:
workspace:
Expand All @@ -52,13 +55,20 @@ jobs:
fetch-depth: 0
submodules: true
- uses: pnpm/action-setup@v4
- uses: actions/[email protected].2
- uses: actions/[email protected].3
with:
node-version-file: '.node-version'
cache: 'pnpm'
- run: corepack enable
- run: pnpm i --frozen-lockfile
- run: pnpm --filter ${{ matrix.workspace }} run eslint
- name: Restore eslint cache
uses: actions/[email protected]
with:
path: node_modules/.cache/eslint
key: eslint-${{ env.eslint-cache-version }}-${{ hashFiles('/pnpm-lock.yaml') }}-${{ github.ref_name }}-${{ github.sha }}
restore-keys: |
eslint-${{ env.eslint-cache-version }}-${{ hashFiles('/pnpm-lock.yaml') }}-
- run: pnpm --filter ${{ matrix.workspace }} run eslint --cache --cache-location node_modules/.cache/eslint --cache-strategy content

typecheck:
needs: [pnpm_install]
Expand All @@ -75,7 +85,7 @@ jobs:
fetch-depth: 0
submodules: true
- uses: pnpm/action-setup@v4
- uses: actions/[email protected].2
- uses: actions/[email protected].3
with:
node-version-file: '.node-version'
cache: 'pnpm'
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/locale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ on:
push:
paths:
- locales/**
- .github/workflows/locale.yml
pull_request:
paths:
- locales/**

- .github/workflows/locale.yml
jobs:
locale_verify:
runs-on: ubuntu-latest
Expand All @@ -18,7 +19,7 @@ jobs:
fetch-depth: 0
submodules: true
- uses: pnpm/action-setup@v4
- uses: actions/[email protected].2
- uses: actions/[email protected].3
with:
node-version-file: '.node-version'
cache: 'pnpm'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/on-release-created.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

strategy:
matrix:
node-version: [20.12.2]
node-version: [20.16.0]

steps:
- uses: actions/[email protected]
Expand All @@ -26,7 +26,7 @@ jobs:
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/[email protected].2
uses: actions/[email protected].3
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
Expand Down
19 changes: 12 additions & 7 deletions .github/workflows/release-edit-with-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: "Release Manager: sync changelog with PR"
on:
push:
branches:
- release/**
- develop
paths:
- 'CHANGELOG.md'

# - .github/workflows/release-edit-with-push.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -20,24 +20,29 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# headがrelease/かつopenのPRを1つ取得
# headが$GITHUB_REF_NAME, baseが$STABLE_BRANCHかつopenのPRを1つ取得
- name: Get PR
run: |
echo "pr_number=$(gh pr list --limit 1 --head "$GITHUB_REF_NAME" --json number --jq '.[] | .number')" >> $GITHUB_OUTPUT
echo "pr_number=$(gh pr list --limit 1 --search "head:$GITHUB_REF_NAME base:$STABLE_BRANCH is:open" --json number --jq '.[] | .number')" >> $GITHUB_OUTPUT
id: get_pr
env:
STABLE_BRANCH: ${{ vars.STABLE_BRANCH }}
- name: Get target version
uses: misskey-dev/release-manager-actions/.github/actions/get-target-version@v1
if: steps.get_pr.outputs.pr_number != ''
uses: misskey-dev/release-manager-actions/.github/actions/get-target-version@v2
id: v
# CHANGELOG.mdの内容を取得
- name: Get changelog
uses: misskey-dev/release-manager-actions/.github/actions/get-changelog@v1
if: steps.get_pr.outputs.pr_number != ''
uses: misskey-dev/release-manager-actions/.github/actions/get-changelog@v2
with:
version: ${{ steps.v.outputs.target_version }}
id: changelog
# PRのnotesを更新
- name: Update PR
if: steps.get_pr.outputs.pr_number != ''
run: |
gh pr edit "$PR_NUMBER" --body "$CHANGELOG"
env:
CHANGELOG: ${{ steps.changelog.outputs.changelog }}
PR_NUMBER: ${{ steps.get_pr.outputs.pr_number }}
CHANGELOG: ${{ steps.changelog.outputs.changelog }}
Loading

0 comments on commit 9fdb174

Please sign in to comment.