-
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-branch 'misskey/develop'
- Loading branch information
Showing
38 changed files
with
258 additions
and
214 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Check CherryPick JS version | ||
|
||
on: | ||
push: | ||
branches: [ develop ] | ||
paths: | ||
- packages/cherrypick-js/package.json | ||
- package.json | ||
pull_request: | ||
branches: [ develop ] | ||
paths: | ||
- packages/cherrypick-js/package.json | ||
- package.json | ||
|
||
jobs: | ||
check-version: | ||
# ルートの package.json と packages/cherrypick-js/package.json のバージョンが一致しているかを確認する | ||
name: Check version | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
- name: Check version | ||
run: | | ||
if [ "$(jq -r '.version' package.json)" != "$(jq -r '.version' packages/cherrypick-js/package.json)" ]; then | ||
echo "Version mismatch!" | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,23 @@ | ||
name: Deploy test environment | ||
name: deploy-test-environment | ||
|
||
on: | ||
push: | ||
#push: | ||
workflow_dispatch: | ||
inputs: | ||
repository: | ||
description: 'Repository to deploy (optional)' | ||
type: string | ||
required: false | ||
branch: | ||
description: 'Branch to deploy (optional)' | ||
branch_or_hash: | ||
description: 'Branch or Commit hash to deploy (optional)' | ||
type: string | ||
required: false | ||
|
||
jobs: | ||
deploy-test-environment: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set environment variable (for tput command & pnpm) | ||
run: | | ||
echo "TERM=xterm" >> $GITHUB_ENV | ||
REPOSITORY=${{ github.event.inputs.repository || github.repository }} | ||
echo "REPOSITORY=$REPOSITORY" >> $GITHUB_ENV | ||
BRANCH=${{ github.event.inputs.branch || github.ref_name }} | ||
echo "BRANCH=$BRANCH" >> $GITHUB_ENV | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: ${{ env.REPOSITORY }} | ||
ref: ${{ env.BRANCH }} | ||
|
||
- name: Get the latest commit SHA | ||
run: | | ||
SHA=$(git log -1 --format="%H") | ||
echo "SHA=$SHA" >> $GITHUB_ENV | ||
- name: Start cloudflare tunnel (quick) | ||
run: | | ||
wget https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb | ||
sudo dpkg -i cloudflared-linux-amd64.deb | ||
sudo cloudflared tunnel --metrics localhost:55555 --url localhost:3000 > /dev/null 2>&1 & | ||
sleep 15 | ||
TUNNEL_RESPONSE=$(curl http://localhost:55555/quicktunnel) | ||
TUNNEL_DOMAIN=$(echo $TUNNEL_RESPONSE | grep -o '"hostname":"[^"]*' | grep -o '[^"]*$') | ||
echo "::add-mask::$TUNNEL_DOMAIN" | ||
echo "TUNNEL_DOMAIN=$TUNNEL_DOMAIN" >> $GITHUB_ENV | ||
- name: Install misskey | ||
run: | | ||
wget https://raw.githubusercontent.com/joinmisskey/bash-install/v4/misskey-install.sh | ||
wget https://raw.githubusercontent.com/joinmisskey/bash-install/v4/testenv_githubactions.txt | ||
sed -i "s/host=127.0.0.1/host=$TUNNEL_DOMAIN/g" testenv_githubactions.txt | ||
sed -i "s|git_repository=https://github.com/misskey-dev/misskey|git_repository=https://github.com/$REPOSITORY|g" testenv_githubactions.txt | ||
sed -i "s|git_branch=master|git_branch=$BRANCH|g" testenv_githubactions.txt | ||
sudo chmod 555 ./misskey-install.sh | ||
sudo bash -x ./misskey-install.sh -c ./testenv_githubactions.txt | ||
- name: Post tunnel info to Discord | ||
run: | | ||
CURRENT_TIME=$(TZ=Asia/Tokyo date +'%Y-%m-%d %H:%M:%S JST') | ||
COMMIT_URL="https://github.com/$REPOSITORY/commit/$SHA" | ||
curl -X POST -H "Content-Type: application/json" -d "{\"content\": \"==============================\nURL: https://$TUNNEL_DOMAIN\nRepository: $REPOSITORY\nBranch: $BRANCH\nCommit: $COMMIT_URL\nTime: $CURRENT_TIME\n==============================\"}" ${{ secrets.DISCORD_WEBHOOK_URL }} | ||
- name: Wait | ||
run: | | ||
timeout 3600 tail -f /var/log/syslog || true | ||
uses: joinmisskey/misskey-tga/.github/workflows/deploy-test-environment.yml@main | ||
with: | ||
repository: ${{ github.event.inputs.repository }} | ||
branch_or_hash: ${{ github.event.inputs.branch_or_hash }} | ||
secrets: | ||
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,21 +50,7 @@ jobs: | |
CI: true | ||
|
||
- name: Upload Coverage | ||
uses: codecov/codecov-action@v3 | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: ./packages/cherrypick-js/coverage/coverage-final.json | ||
|
||
check-version: | ||
# ルートの package.json と packages/cherrypick-js/package.json のバージョンが一致しているかを確認する | ||
name: Check version | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
- name: Check version | ||
run: | | ||
if [ "$(jq -r '.version' package.json)" != "$(jq -r '.version' packages/cherrypick-js/package.json)" ]; then | ||
echo "Version mismatch!" | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
packages/backend/migration/1706791962000-fix-meta-disableRegistration.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* | ||
* SPDX-FileCopyrightText: syuilo and other misskey, cherrypick contributors | ||
* SPDX-License-Identifier: AGPL-3.0-only | ||
*/ | ||
|
||
export class FixMetaDisableRegistration1706791962000 { | ||
name = 'FixMetaDisableRegistration1706791962000' | ||
|
||
async up(queryRunner) { | ||
await queryRunner.query(`alter table meta alter column "disableRegistration" set default true;`); | ||
} | ||
|
||
async down(queryRunner) { | ||
await queryRunner.query(`alter table meta alter column "disableRegistration" set default false;`); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.