mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-04-28 22:39:18 +08:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c734270126 | |||
| 25c3518931 | |||
| 562e4f8322 | |||
| d857f6e7d1 | |||
| 049bc49c7f | |||
| a4dccb8504 | |||
| caae41500c | |||
| a1871558dd | |||
| 72c7d58777 |
@@ -0,0 +1,79 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
#---------------Infrastructure configuration---------------------#
|
||||
etcd:
|
||||
etcdSchema: openim #默认即可
|
||||
etcdAddr: [ 127.0.0.1:2379 ] #单机部署时,默认即可
|
||||
userName:
|
||||
password:
|
||||
secret: openIM123
|
||||
|
||||
mysql:
|
||||
dbMysqlDatabaseName: admin_chat # 数据库名字 默认即可
|
||||
|
||||
# 默认管理员账号
|
||||
admin:
|
||||
defaultAccount:
|
||||
account: [ "admin1", "admin2" ]
|
||||
defaultPassword: [ "password1", "password2" ]
|
||||
openIMUserID: [ "openIM123456", "openIMAdmin" ]
|
||||
faceURL: [ "", "" ]
|
||||
nickname: [ "admin1", "admin2" ]
|
||||
level: [ 1, 100 ]
|
||||
|
||||
|
||||
adminapi:
|
||||
openImAdminApiPort: [ 10009 ] #管理后台api服务端口,默认即可,需要开放此端口或做nginx转发
|
||||
listenIP: 0.0.0.0
|
||||
|
||||
chatapi:
|
||||
openImChatApiPort: [ 10008 ] #登录注册,默认即可,需要开放此端口或做nginx转发
|
||||
listenIP: 0.0.0.0
|
||||
|
||||
rpcport: # rpc服务端口 默认即可
|
||||
openImAdminPort: [ 30200 ]
|
||||
openImChatPort: [ 30300 ]
|
||||
|
||||
|
||||
rpcregistername: #rpc注册服务名,默认即可
|
||||
openImChatName: Chat
|
||||
openImAdminCMSName: Admin
|
||||
|
||||
chat:
|
||||
codeTTL: 300 #短信验证码有效时间(秒)
|
||||
superVerificationCode: 666666 # 超级验证码
|
||||
alismsverify: #阿里云短信配置,在阿里云申请成功后修改以下四项
|
||||
accessKeyId:
|
||||
accessKeySecret:
|
||||
signName:
|
||||
verificationCodeTemplateCode:
|
||||
|
||||
|
||||
oss:
|
||||
tempDir: enterprise-temp # 临时密钥上传的目录
|
||||
dataDir: enterprise-data # 最终存放目录
|
||||
aliyun:
|
||||
endpoint: https://oss-cn-chengdu.aliyuncs.com
|
||||
accessKeyID: ""
|
||||
accessKeySecret: ""
|
||||
bucket: ""
|
||||
tencent:
|
||||
BucketURL: ""
|
||||
serviceURL: https://cos.COS_REGION.myqcloud.com
|
||||
secretID: ""
|
||||
secretKey: ""
|
||||
sessionToken: ""
|
||||
bucket: ""
|
||||
use: "minio"
|
||||
+13
-13
@@ -12,16 +12,16 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: openim-cm
|
||||
data:
|
||||
config.yaml: |+
|
||||
{{- with .Values.config }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
notification.yaml: |+
|
||||
{{- with .Values.notification }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
#more datasource-compose.yaml
|
||||
apiVersion: 1
|
||||
|
||||
datasources:
|
||||
- name: Prometheus
|
||||
type: prometheus
|
||||
access: proxy
|
||||
orgId: 1
|
||||
url: http://127.0.0.1:9091
|
||||
basicAuth: false
|
||||
isDefault: true
|
||||
version: 1
|
||||
editable: true
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,85 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
#more prometheus-compose.yml
|
||||
global:
|
||||
scrape_interval: 15s
|
||||
evaluation_interval: 15s
|
||||
external_labels:
|
||||
monitor: 'openIM-monitor'
|
||||
|
||||
scrape_configs:
|
||||
- job_name: 'prometheus'
|
||||
static_configs:
|
||||
- targets: ['localhost:9091']
|
||||
|
||||
- job_name: 'openIM-server'
|
||||
metrics_path: /metrics
|
||||
static_configs:
|
||||
- targets: ['localhost:10002']
|
||||
labels:
|
||||
group: 'api'
|
||||
|
||||
- targets: ['localhost:20110']
|
||||
labels:
|
||||
group: 'user'
|
||||
|
||||
- targets: ['localhost:20120']
|
||||
labels:
|
||||
group: 'friend'
|
||||
|
||||
- targets: ['localhost:20130']
|
||||
labels:
|
||||
group: 'message'
|
||||
|
||||
- targets: ['localhost:20140']
|
||||
labels:
|
||||
group: 'msg-gateway'
|
||||
|
||||
- targets: ['localhost:20150']
|
||||
labels:
|
||||
group: 'group'
|
||||
|
||||
- targets: ['localhost:20160']
|
||||
labels:
|
||||
group: 'auth'
|
||||
|
||||
- targets: ['localhost:20170']
|
||||
labels:
|
||||
group: 'push'
|
||||
|
||||
- targets: ['localhost:20120']
|
||||
labels:
|
||||
group: 'friend'
|
||||
|
||||
|
||||
- targets: ['localhost:20230']
|
||||
labels:
|
||||
group: 'conversation'
|
||||
|
||||
|
||||
- targets: ['localhost:21400', 'localhost:21401', 'localhost:21402', 'localhost:21403']
|
||||
labels:
|
||||
group: 'msg-transfer'
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
- job_name: 'node'
|
||||
scrape_interval: 8s
|
||||
static_configs:
|
||||
- targets: ['localhost:9100']
|
||||
|
||||
+7
-4
@@ -1,12 +1,12 @@
|
||||
# Ignore files and directories starting with a dot
|
||||
<!-- # Ignore files and directories starting with a dot
|
||||
|
||||
# Ignore specific files
|
||||
.dockerignore
|
||||
.git
|
||||
|
||||
# Ignore build artifacts
|
||||
logs/
|
||||
_output/
|
||||
logs/
|
||||
|
||||
# Ignore non-essential documentation
|
||||
README.md
|
||||
README-zh_CN.md
|
||||
@@ -17,6 +17,9 @@ CHANGELOG/
|
||||
# Ignore testing and linting configuration
|
||||
.golangci.yml
|
||||
|
||||
# Ignore deployment-related files
|
||||
docker-compose.yaml
|
||||
deployments/
|
||||
|
||||
# Ignore assets
|
||||
assets/
|
||||
@@ -25,4 +28,4 @@ assets/
|
||||
components/
|
||||
|
||||
# Ignore tools and scripts
|
||||
.github/
|
||||
.github/ -->
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
MONGO_IMAGE=mongo:6.0.2
|
||||
REDIS_IMAGE=redis:7.0.0
|
||||
ZOOKEEPER_IMAGE=bitnami/zookeeper:3.8
|
||||
KAFKA_IMAGE=bitnami/kafka:3.5.1
|
||||
MINIO_IMAGE=minio/minio:RELEASE.2024-01-11T07-46-16Z
|
||||
ETCD_IMAGE=quay.io/coreos/etcd:v3.5.13
|
||||
PROMETHEUS_IMAGE=prom/prometheus:v2.45.6
|
||||
ALERTMANAGER_IMAGE=prom/alertmanager:v0.27.0
|
||||
GRAFANA_IMAGE=grafana/grafana:11.0.1
|
||||
|
||||
OPENIM_WEB_FRONT_IMAGE=openim/openim-web-front:release-v3.8.1
|
||||
OPENIM_ADMIN_FRONT_IMAGE=openim/openim-admin-front:release-v1.8.2
|
||||
|
||||
#FRONT_IMAGE: use aliyun images
|
||||
#OPENIM_WEB_FRONT_IMAGE=registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-web-front:release-v3.8.1
|
||||
#OPENIM_ADMIN_FRONT_IMAGE=registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-admin-front:release-v1.8.2
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
USER=root
|
||||
PASSWORD=openIM123
|
||||
MINIO_ENDPOINT=http://127.0.0.1:10005
|
||||
API_URL=http://127.0.0.1:10002
|
||||
DATA_DIR=./
|
||||
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
*.sh text eol=lf
|
||||
+15
-18
@@ -1,3 +1,17 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
coverage:
|
||||
status:
|
||||
project:
|
||||
@@ -6,21 +20,4 @@ coverage:
|
||||
paths:
|
||||
- pkg/* # only include coverage in "pkg/" folder
|
||||
informational: true # Always pass check
|
||||
tools: # declare a new status context "tools"
|
||||
paths:
|
||||
- tools/* # only include coverage in "tools/" folder
|
||||
informational: true # Always pass check
|
||||
test: # declare a new status context "test"
|
||||
paths:
|
||||
- test/* # only include coverage in "test/" folder
|
||||
informational: true # Always pass check
|
||||
|
||||
# internal: # declare a new status context "internal"
|
||||
# paths:
|
||||
# - internal/* # only include coverage in "internal/" folder
|
||||
# informational: true # Always pass check
|
||||
# cmd: # declare a new status context "cmd"
|
||||
# paths:
|
||||
# - cmd/* # only include coverage in "cmd/" folder
|
||||
# informational: true # Always pass check
|
||||
patch: off # disable the commit only checks
|
||||
patch: off # disable the commit only checks
|
||||
@@ -1,65 +0,0 @@
|
||||
name: Bug Report
|
||||
title: "[BUG] "
|
||||
labels: ["bug"]
|
||||
description: "Create a detailed report to help us identify and resolve issues."
|
||||
# assignees: []
|
||||
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: "Thank you for taking the time to fill out the bug report. Please provide as much information as possible to help us understand and replicate the bug."
|
||||
|
||||
- type: input
|
||||
id: openim-server-version
|
||||
attributes:
|
||||
label: OpenIM Server Version
|
||||
description: "Please provide the version number of OpenIM Server you are using."
|
||||
placeholder: "e.g., 3.8.0"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: dropdown
|
||||
id: operating-system
|
||||
attributes:
|
||||
label: Operating System and CPU Architecture
|
||||
description: "Please select the operating system and describe the CPU architecture."
|
||||
options:
|
||||
- Linux (AMD)
|
||||
- Linux (ARM)
|
||||
- Windows (AMD)
|
||||
- Windows (ARM)
|
||||
- macOS (AMD)
|
||||
- macOS (ARM)
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: dropdown
|
||||
id: deployment-method
|
||||
attributes:
|
||||
label: Deployment Method
|
||||
description: "Please specify how OpenIM Server was deployed."
|
||||
options:
|
||||
- Source Code Deployment
|
||||
- Docker Deployment
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: bug-description-reproduction
|
||||
attributes:
|
||||
label: Bug Description and Steps to Reproduce
|
||||
description: "Provide a detailed description of the bug and a step-by-step guide on how to reproduce it."
|
||||
placeholder: "Describe the bug in detail here...\n\nSteps to reproduce the bug on the server:\n1. Start the server with specific configurations (mention any relevant config details).\n2. Make an API call to '...' endpoint with the following payload '...'.\n3. Observe the behavior and note any error messages or logs.\n4. Mention any additional setup relevant to the bug (e.g., database version, external service dependencies)."
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: "If possible, please add screenshots to help explain your problem."
|
||||
|
||||
- type: textarea
|
||||
id: screenshots-link
|
||||
attributes:
|
||||
label: Screenshots Link
|
||||
description: "If applicable, please provide any links to screenshots here."
|
||||
placeholder: "Paste your screenshot URL here, e.g., http://imgur.com/example"
|
||||
@@ -1,11 +0,0 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
# - name: "Bug Report"
|
||||
# description: "Report a bug in the project"
|
||||
# file: "bug-report.yml"
|
||||
- name: 📢 Connect on slack
|
||||
url: https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg
|
||||
about: Support OpenIM-related requests or issues, get in touch with developers and help on slack
|
||||
- name: 🌐 OpenIM Blog
|
||||
url: https://www.openim.io/
|
||||
about: Open the OpenIM community blog
|
||||
@@ -1,65 +0,0 @@
|
||||
name: Deployment issue
|
||||
title: "[Deployment] "
|
||||
labels: ["deployment"]
|
||||
description: "Create a detailed report to help us identify and resolve deployment issues."
|
||||
# assignees: []
|
||||
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: "Thank you for taking the time to fill out the deployment issue report. Please provide as much information as possible to help us understand and resolve the issue."
|
||||
|
||||
- type: input
|
||||
id: openim-server-version
|
||||
attributes:
|
||||
label: OpenIM Server Version
|
||||
description: "Please provide the version number of OpenIM Server you are using."
|
||||
placeholder: "e.g., 3.8.0"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: dropdown
|
||||
id: operating-system
|
||||
attributes:
|
||||
label: Operating System and CPU Architecture
|
||||
description: "Please select the operating system and describe the CPU architecture."
|
||||
options:
|
||||
- Linux (AMD)
|
||||
- Linux (ARM)
|
||||
- Windows (AMD)
|
||||
- Windows (ARM)
|
||||
- macOS (AMD)
|
||||
- macOS (ARM)
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: dropdown
|
||||
id: deployment-method
|
||||
attributes:
|
||||
label: Deployment Method
|
||||
description: "Please specify how OpenIM Server was deployed."
|
||||
options:
|
||||
- Source Code Deployment
|
||||
- Docker Deployment
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: issue-description-reproduction
|
||||
attributes:
|
||||
label: Issue Description and Steps to Reproduce
|
||||
description: "Provide a detailed description of the issue and a step-by-step guide on how to reproduce it."
|
||||
placeholder: "Describe the issue in detail here...\n\nSteps to reproduce the issue on the server:\n1. Start the server with specific configurations (mention any relevant config details).\n2. Make an API call to '...' endpoint with the following payload '...'.\n3. Observe the behavior and note any error messages or logs.\n4. Mention any additional setup relevant to the bug (e.g., database version, external service dependencies)."
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: "If possible, please add screenshots to help explain your problem."
|
||||
|
||||
- type: textarea
|
||||
id: screenshots-link
|
||||
attributes:
|
||||
label: Screenshots Link
|
||||
description: "If applicable, please provide any links to screenshots here."
|
||||
placeholder: "Paste your screenshot URL here, e.g., http://imgur.com/example"
|
||||
@@ -1,20 +0,0 @@
|
||||
---
|
||||
name: Documentation Update
|
||||
about: Propose updates to documentation, including README files and other docs.
|
||||
title: "[DOC]: " # Prefix for the title to help identify documentation issues
|
||||
labels: documentation # Labels to be automatically added
|
||||
assignees: '' # Optionally, specify maintainers or teams to be auto-assigned
|
||||
|
||||
---
|
||||
|
||||
## Documentation Updates
|
||||
Describe the documentation that needs to be updated or corrected. Please specify the files and sections if possible.
|
||||
|
||||
## Motivation
|
||||
Explain why these updates are necessary. What is missing, misleading, or outdated?
|
||||
|
||||
## Suggested Changes
|
||||
Detail the changes that you propose. If you are suggesting large changes, include examples or mockups of what the updated documentation should look like.
|
||||
|
||||
## Additional Information
|
||||
Include any other information that might be relevant, such as links to discussions or related issues in the repository.
|
||||
@@ -1,43 +0,0 @@
|
||||
name: Feature Request
|
||||
title: "[FEATURE REQUEST] "
|
||||
labels: ["feature request","enhancement"]
|
||||
description: "Propose a new feature or improvement that you believe will help enhance the project."
|
||||
# assignees: []
|
||||
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: "Thank you for taking the time to propose a feature request. Please fill in as much detail as possible to help us understand why this feature is necessary and how it should work."
|
||||
|
||||
- type: textarea
|
||||
id: feature-reason
|
||||
attributes:
|
||||
label: Why this feature?
|
||||
description: "Explain why this feature is needed. What problem does it solve? How does it benefit the project and its users?"
|
||||
placeholder: "Describe the need for this feature..."
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: solution-proposal
|
||||
attributes:
|
||||
label: Suggested Solution
|
||||
description: "Describe your proposed solution for this feature. How do you envision it working?"
|
||||
placeholder: "Detail your solution here..."
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: "Please provide any other relevant information or screenshots that could help illustrate your idea."
|
||||
|
||||
- type: textarea
|
||||
id: additional-info
|
||||
attributes:
|
||||
label: Additional Information
|
||||
description: "Include any additional information, links, or screenshots that might be relevant to your feature request."
|
||||
placeholder: "Add more context or links to relevant resources..."
|
||||
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: "Thank you for contributing to the project! We appreciate your input and will review your suggestion as soon as possible."
|
||||
@@ -1,30 +0,0 @@
|
||||
name: 🐧 Other
|
||||
description: Use this for any other issues. Please do NOT create blank issues
|
||||
title: "[Other]: <give this problem a name>"
|
||||
labels: ["other"]
|
||||
# assignees: []
|
||||
|
||||
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: "# Other issue"
|
||||
- type: textarea
|
||||
id: issuedescription
|
||||
attributes:
|
||||
label: What would you like to share?
|
||||
description: Provide a clear and concise explanation of your issue.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: extrainfo
|
||||
attributes:
|
||||
label: Additional information
|
||||
description: Is there anything else we should know about this issue?
|
||||
validations:
|
||||
required: false
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
You can also join our Discord community [here](https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg)
|
||||
Feel free to check out other cool repositories of the openim Community [here](https://github.com/openimsdk)
|
||||
@@ -1,26 +0,0 @@
|
||||
---
|
||||
name: RFC - Feature Proposal
|
||||
about: Submit a proposal for a significant feature to invite community discussion.
|
||||
title: "[RFC]: " # Prefix for the title to help identify RFC proposals
|
||||
labels: rfc, proposal # Labels to be automatically added
|
||||
assignees: '' # Optionally, specify maintainers or teams to be auto-assigned
|
||||
|
||||
---
|
||||
|
||||
## Proposal Overview
|
||||
Briefly describe the content and objectives of your proposal.
|
||||
|
||||
## Motivation
|
||||
Why is this new feature necessary? What is the background of this problem?
|
||||
|
||||
## Detailed Design
|
||||
Describe the technical details of the proposal, including implementation steps, code snippets, or architecture diagrams.
|
||||
|
||||
## Alternatives Considered
|
||||
Have other alternatives been considered? Why is this approach preferred over others?
|
||||
|
||||
## Impact
|
||||
How will this proposal affect existing practices and community users?
|
||||
|
||||
## Additional Information
|
||||
Include any other relevant information such as related discussions, prior related work, etc.
|
||||
@@ -0,0 +1,59 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# To get started with Dependabot version updates, you'll need to specify which
|
||||
# package ecosystems to update and where the package manifests are located.
|
||||
# Please see the documentation for all configuration options:
|
||||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "gomod"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
time: "08:00"
|
||||
labels:
|
||||
- "dependencies"
|
||||
commit-message:
|
||||
prefix: "feat"
|
||||
include: "scope"
|
||||
groups:
|
||||
gomod-deps:
|
||||
patterns:
|
||||
- "*"
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
time: "08:00"
|
||||
labels:
|
||||
- "dependencies"
|
||||
commit-message:
|
||||
prefix: "chore"
|
||||
include: "scope"
|
||||
groups:
|
||||
github-actions:
|
||||
patterns:
|
||||
- "*"
|
||||
- package-ecosystem: "docker"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
time: "08:00"
|
||||
labels:
|
||||
- "dependencies"
|
||||
commit-message:
|
||||
prefix: "feat"
|
||||
include: "scope"
|
||||
@@ -12,18 +12,32 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "openim-api.fullname" . }}
|
||||
labels:
|
||||
{{- include "openim-api.labels" . | nindent 4 }}
|
||||
spec:
|
||||
type: {{ .Values.service.type }}
|
||||
ports:
|
||||
- port: {{ .Values.service.port }}
|
||||
targetPort: webhook
|
||||
protocol: TCP
|
||||
name: webhook
|
||||
selector:
|
||||
{{- include "openim-api.selectorLabels" . | nindent 4 }}
|
||||
# Refer to Kubernetes for size/* Settings
|
||||
# https://github.com/Kubernetes/Kubernetes
|
||||
XS:
|
||||
name: size/XS
|
||||
lines: 0
|
||||
color: 3CBF00
|
||||
S:
|
||||
name: size/S
|
||||
lines: 10
|
||||
color: 5D9801
|
||||
M:
|
||||
name: size/M
|
||||
lines: 30
|
||||
color: 7F7203
|
||||
L:
|
||||
name: size/L
|
||||
lines: 100
|
||||
color: A14C05
|
||||
XL:
|
||||
name: size/XL
|
||||
lines: 500
|
||||
color: C32607
|
||||
XXL:
|
||||
name: size/XXL
|
||||
lines: 1000
|
||||
color: E50009
|
||||
comment: |
|
||||
# Whoa! Easy there, Partner!
|
||||
This PR is too big. Please break it up into smaller PRs.
|
||||
@@ -0,0 +1,51 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
name-template: 'v$RESOLVED_VERSION 🌈'
|
||||
tag-template: 'v$RESOLVED_VERSION'
|
||||
categories:
|
||||
- title: '🚀 Features'
|
||||
labels:
|
||||
- 'feature'
|
||||
- 'enhancement'
|
||||
- title: '🐛 Bug Fixes'
|
||||
labels:
|
||||
- 'kind/fix'
|
||||
- 'kind/feature'
|
||||
- 'enhancement'
|
||||
- 'kind/documentation'
|
||||
- 'good first issue'
|
||||
- title: '🧰 Maintenance'
|
||||
label: 'chore'
|
||||
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
|
||||
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
|
||||
version-resolver:
|
||||
major:
|
||||
labels:
|
||||
- 'major'
|
||||
minor:
|
||||
labels:
|
||||
- 'minor'
|
||||
patch:
|
||||
labels:
|
||||
- 'patch'
|
||||
default: patch
|
||||
template: |
|
||||
## Changes $PREVIOUS_TAG
|
||||
|
||||
$CHANGES
|
||||
|
||||
## Contributors to this $REPOSITORY release
|
||||
|
||||
$CONTRIBUTORS
|
||||
@@ -1,4 +1,4 @@
|
||||
openimsdk/openim-docker:
|
||||
OpenIMSDK/openim-docker:
|
||||
- source: ./config
|
||||
dest: ./openim-server/release/config
|
||||
replace: true
|
||||
|
||||
@@ -0,0 +1,136 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# https://github.com/BetaHuhn/repo-file-sync-action
|
||||
# Synchronization for the.github repository
|
||||
OpenIMSDK/.github:
|
||||
- source: LICENSE
|
||||
dest: LICENSE
|
||||
- source: scripts/LICENSE/
|
||||
dest: scripts/LICENSE/
|
||||
replace: false
|
||||
|
||||
OpenIMSDK/community:
|
||||
- source: LICENSE
|
||||
dest: LICENSE
|
||||
- source: scripts/LICENSE/
|
||||
dest: scripts/LICENSE/
|
||||
replace: false
|
||||
- source: .github/workflows/
|
||||
dest: .github/workflows/
|
||||
|
||||
OpenIMSDK/openim-sdk-core:
|
||||
- source: LICENSE
|
||||
dest: LICENSE
|
||||
- source: scripts/LICENSE/
|
||||
dest: scripts/LICENSE/
|
||||
replace: false
|
||||
- source: .github/workflows/issue-robot.yml
|
||||
dest: .github/workflows/issue-robot.yml
|
||||
replace: false
|
||||
- source: .github/workflows/stale.yml
|
||||
dest: .github/workflows/stale.yml
|
||||
replace: false
|
||||
- source: .github/.codecov.yml
|
||||
dest: .github/.codecov.yml
|
||||
replace: false
|
||||
|
||||
OpenIMSDK/OpenIM-Docs:
|
||||
- source: .github/workflows/
|
||||
dest: .github/workflows/
|
||||
exclude: |
|
||||
e2e-test.yml
|
||||
sync.yml
|
||||
- source: scripts/githooks/
|
||||
dest: scripts/githooks/
|
||||
replace: true
|
||||
- source: .github/.codecov.yml
|
||||
dest: .github/.codecov.yml
|
||||
replace: false
|
||||
|
||||
OpenIMSDK/OpenKF:
|
||||
- source: LICENSE
|
||||
dest: LICENSE
|
||||
- source: scripts/LICENSE/
|
||||
dest: scripts/LICENSE/
|
||||
replace: false
|
||||
- source: .github/workflows/issue-robot.yml
|
||||
dest: .github/workflows/issue-robot.yml
|
||||
replace: false
|
||||
- source: .github/workflows/stale.yml
|
||||
dest: .github/workflows/stale.yml
|
||||
replace: false
|
||||
- source: .github/.codecov.yml
|
||||
dest: .github/.codecov.yml
|
||||
replace: false
|
||||
|
||||
OpenIMSDK/openim-docker:
|
||||
- source: ./config
|
||||
dest: ./openim-server/main/config
|
||||
replace: true
|
||||
- source: ./docs
|
||||
dest: ./openim-server/main/docs
|
||||
replace: true
|
||||
- source: ./scripts
|
||||
dest: ./openim-server/main/scripts
|
||||
replace: true
|
||||
- source: ./scripts
|
||||
dest: ./scripts
|
||||
replace: true
|
||||
- source: ./Makefile
|
||||
dest: ./Makefile
|
||||
replace: true
|
||||
|
||||
group:
|
||||
# first group:common to all warehouses
|
||||
# TODO: add the required warehouse here
|
||||
- repos: |
|
||||
OpenIMSDK/OpenKF@main
|
||||
OpenIMSDK/openim-miniprogram-demo@main
|
||||
OpenIMSDK/docs
|
||||
OpenIMSDK/chat
|
||||
OpenIMSDK/community
|
||||
OpenIMSDK/openim-charts
|
||||
OpenIMSDK/openim-sdk-cpp@main
|
||||
files:
|
||||
- source: LICENSE
|
||||
dest: LICENSE
|
||||
replace: false
|
||||
- source: .github/workflows/issue-robot.yml
|
||||
dest: .github/workflows/issue-robot.yml
|
||||
replace: false
|
||||
- source: .github/workflows/stale.yml
|
||||
dest: .github/workflows/stale.yml
|
||||
replace: false
|
||||
- source: .github/workflows/project-progress.yml
|
||||
dest: .github/workflows/project-progress.yml
|
||||
replace: false
|
||||
- source: .github/workflows/help-comment-issue.yml
|
||||
dest: .github/workflows/help-comment-issue.yml
|
||||
replace: false
|
||||
- source: .github/.codecov.yml
|
||||
dest: .github/.codecov.yml
|
||||
replace: false
|
||||
- source: .github/workflows/cla.yml
|
||||
dest: .github/workflows/cla.yml
|
||||
replace: false
|
||||
- source: .github/workflows/auto-assign-issue.yml
|
||||
dest: .github/workflows/auto-assign-issue.yml
|
||||
replace: false
|
||||
- source: .github/workflows/release.yml
|
||||
dest: .github/workflows/release.yml
|
||||
replace: false
|
||||
- source: ./scripts/githooks/
|
||||
dest: ./scripts/githooks/
|
||||
replace: true
|
||||
+7
-12
@@ -12,15 +12,10 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
{{- if .Values.serviceAccount.create -}}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ include "openim-api.serviceAccountName" . }}
|
||||
labels:
|
||||
{{- include "openim-api.labels" . | nindent 4 }}
|
||||
{{- with .Values.serviceAccount.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
# https://github.com/apps/weekly-digest/installations/new
|
||||
publishDay: sun
|
||||
canPublishIssues: true
|
||||
canPublishPullRequests: true
|
||||
canPublishContributors: true
|
||||
canPublishStargazers: true
|
||||
canPublishCommits: true
|
||||
@@ -1,3 +1,17 @@
|
||||
# Copyright © 2023 OpenIM open source community. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
name: Assign issue to comment author
|
||||
on:
|
||||
issue_comment:
|
||||
@@ -6,24 +20,24 @@ jobs:
|
||||
assign-issue:
|
||||
if: |
|
||||
contains(github.event.comment.body, '/assign') || contains(github.event.comment.body, '/accept') &&
|
||||
!contains(github.event.comment.user.login, 'openim-robot')
|
||||
!contains(github.event.comment.user.login, 'openimbot') &&
|
||||
!contains(github.event.comment.user.login, 'kubbot')
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Assign the issue
|
||||
run: |
|
||||
export LETASE_MILESTONES=$(curl 'https://api.github.com/repos/$OWNER/$PEPO/milestones' | jq -r 'last(.[]).title')
|
||||
gh issue edit ${{ github.event.issue.number }} --add-assignee "${{ github.event.comment.user.login }}"
|
||||
gh issue edit ${{ github.event.issue.number }} --add-label "accepted"
|
||||
gh issue edit ${{ github.event.issue.number }} --add-label "triage/accepted"
|
||||
gh issue edit ${{ github.event.issue.number }} --milestone "$LETASE_MILESTONES"
|
||||
gh issue comment $ISSUE --body "@${{ github.event.comment.user.login }} Glad to see you accepted this issue🤲, this issue has been assigned to you. I set the milestones for this issue to [$LETASE_MILESTONES](https://github.com/$OWNER/$PEPO/milestones), We are looking forward to your PR!"
|
||||
|
||||
# gh issue edit ${{ github.event.issue.number }} --milestone "$LETASE_MILESTONES"
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.BOT_TOKEN }}
|
||||
GH_TOKEN: ${{ secrets.REDBOT_GITHUB_TOKEN }}
|
||||
ISSUE: ${{ github.event.issue.html_url }}
|
||||
OWNER: ${{ github.repository_owner }}
|
||||
REPO: ${{ github.event.repository.name }}
|
||||
REPO: ${{ github.event.repository.name }}
|
||||
@@ -0,0 +1,61 @@
|
||||
# Copyright © 2023 OpenIM open source community. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
name: Auto PR to release
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
# types:
|
||||
# - closed
|
||||
issue_comment:
|
||||
types: [created]
|
||||
pull_request_review_comment:
|
||||
types: [created]
|
||||
|
||||
jobs:
|
||||
create-pr:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.pull_request.base.ref == 'main'
|
||||
# && github.event.pull_request.merged == true
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Create PR to release branch
|
||||
run: |
|
||||
ISSUEID=$(gh pr view ${{ github.event.pull_request.number }} --repo $OWNER/$REPO | grep -oP 'Fixes #\K\d+')
|
||||
echo "===========> $ISSUEID"
|
||||
ISSUE=$(gh issue view $ISSUEID --repo $OWNER/$REPO --json labels,assignees,milestone,title)
|
||||
echo "===========> $ISSUE"
|
||||
|
||||
LABELS=$(echo $ISSUE | jq -r '.labels[] | select(.name) | .name' | jq -R -r -s -c 'split("\n")[:-1] | join(",")')
|
||||
ASSIGNEES=$(echo $ISSUE | jq -r '.assignees[] | select(.login) | .login' | jq -R -s -c 'split("\n")[:-1] | join(",")')
|
||||
MILESTONE=$(echo $ISSUE | jq -r '.milestone | select(.title) | .title')
|
||||
TITLE=$(echo $ISSUE | jq -r '.title')
|
||||
|
||||
gh pr edit ${{ github.event.pull_request.number }} --repo $OWNER/$REPO --add-label "$LABELS" --add-assignee "$ASSIGNEES" --milestone "$MILESTONE"
|
||||
|
||||
# git checkout -b bot/merge-to-release-$ISSUEID
|
||||
# git push origin bot/merge-to-release-$ISSUEID
|
||||
# gh pr create --base release --head bot/merge-to-release-$ISSUEID --title "Merge main to release" --body ""
|
||||
# gh pr create --base main --head feat/auto-release-pr-624 --title "The bug is fixed" --body "$x" --repo OpenIMSDK/Open-IM-Server --reviewer "cubxxw"
|
||||
continue-on-error: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
ISSUE: ${{ github.event.issue.html_url }}
|
||||
OWNER: ${{ github.repository_owner }}
|
||||
REPO: ${{ github.event.repository.name }}
|
||||
@@ -1,39 +1,53 @@
|
||||
name: Invite users to join OpenIM Community.
|
||||
# Copyright © 2023 OpenIM open source community. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
name: Invite users to join our group
|
||||
on:
|
||||
issue_comment:
|
||||
types:
|
||||
- created
|
||||
jobs:
|
||||
issue_comment:
|
||||
name: Invite users to join OpenIM Community
|
||||
name: Invite users to join our group
|
||||
if: ${{ github.event.comment.body == '/invite' || github.event.comment.body == '/close' || github.event.comment.body == '/comment' }}
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
steps:
|
||||
|
||||
- name: Invite user to join OpenIM Community
|
||||
uses: peter-evans/create-or-update-comment@v4
|
||||
- name: Invite user to join our group
|
||||
uses: peter-evans/create-or-update-comment@v3
|
||||
with:
|
||||
token: ${{ secrets.BOT_GITHUB_TOKEN }}
|
||||
issue-number: ${{ github.event.issue.number }}
|
||||
body: |
|
||||
We value close connections with our users, developers, and contributors here at Open-IM-Server. With a large community and maintainer team, we're always here to help and support you. Whether you're looking to join our community or have any questions or suggestions, we welcome you to get in touch with us.
|
||||
|
||||
Our most recommended way to get in touch is through [Slack](https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q). Even if you're in China, Slack is usually not blocked by firewalls, making it an easy way to connect with us. Our Slack community is the ideal place to discuss and share ideas and suggestions with other users and developers of Open-IM-Server. You can ask technical questions, seek help, or share your experiences with other users of Open-IM-Server.
|
||||
Our most recommended way to get in touch is through [Slack](https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg). Even if you're in China, Slack is usually not blocked by firewalls, making it an easy way to connect with us. Our Slack community is the ideal place to discuss and share ideas and suggestions with other users and developers of Open-IM-Server. You can ask technical questions, seek help, or share your experiences with other users of Open-IM-Server.
|
||||
|
||||
In addition to Slack, we also offer the following ways to get in touch:
|
||||
|
||||
+ <a href="https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q" target="_blank"><img src="https://img.shields.io/badge/Slack-OpenIM%2B-blueviolet?logo=slack&logoColor=white"></a> We also have Slack channels for you to communicate and discuss. To join, visit https://slack.com/ and join our [👀 Open-IM-Server slack](https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q) team channel.
|
||||
+ <a href="https://mail.google.com/mail/u/0/?fs=1&tf=cm&to=info@openim.io" target="_blank"><img src="https://img.shields.io/badge/gmail-%40OOpenIMSDKCore?style=social&logo=gmail"></a> Get in touch with us on [Gmail](https://mail.google.com/mail/u/0/?fs=1&tf=cm&to=winxu81@gmail.com). If you have any questions or issues that need resolving, or any suggestions and feedback for our open source projects, please feel free to contact us via email.
|
||||
+ <a href="https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg" target="_blank"><img src="https://img.shields.io/badge/Slack-OpenIM%2B-blueviolet?logo=slack&logoColor=white"></a> We also have Slack channels for you to communicate and discuss. To join, visit https://slack.com/ and join our [👀 Open-IM-Server slack](https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg) team channel.
|
||||
+ <a href="https://mail.google.com/mail/u/0/?fs=1&tf=cm&to=winxu81@gmail.com" target="_blank"><img src="https://img.shields.io/badge/gmail-%40OOpenIMSDKCore?style=social&logo=gmail"></a> Get in touch with us on [Gmail](https://mail.google.com/mail/u/0/?fs=1&tf=cm&to=winxu81@gmail.com). If you have any questions or issues that need resolving, or any suggestions and feedback for our open source projects, please feel free to contact us via email.
|
||||
+ <a href="https://doc.rentsoft.cn/" target="_blank"><img src="https://img.shields.io/badge/%E5%8D%9A%E5%AE%A2-%40OpenIMSDKCore-blue?style=social&logo=Octopus%20Deploy"></a> Read our [blog](https://doc.rentsoft.cn/). Our blog is a great place to stay up-to-date with Open-IM-Server projects and trends. On the blog, we share our latest developments, tech trends, and other interesting information.
|
||||
+ <a href="https://github.com/OpenIMSDK/OpenIM-Docs/blob/main/docs/images/WechatIMG20.jpeg" target="_blank"><img src="https://img.shields.io/badge/%E5%BE%AE%E4%BF%A1-OpenIMSDKCore-brightgreen?logo=wechat&style=flat-square"></a> Add [Wechat](https://github.com/OpenIMSDK/OpenIM-Docs/blob/main/docs/images/WechatIMG20.jpeg) and indicate that you are a user or developer of Open-IM-Server. We will process your request as soon as possible.
|
||||
|
||||
# - name: Close Issue
|
||||
# uses: peter-evans/close-issue@v3
|
||||
# with:
|
||||
# token: ${{ secrets.BOT_GITHUB_TOKEN }}
|
||||
# issue-number: ${{ github.event.issue.number }}
|
||||
# comment: 🤖 Auto-closing issue, if you still need help please reopen the issue or ask for help in the community above
|
||||
# labels: |
|
||||
# accepted
|
||||
- name: Close Issue
|
||||
uses: peter-evans/close-issue@v3
|
||||
with:
|
||||
token: ${{ secrets.BOT_GITHUB_TOKEN }}
|
||||
issue-number: ${{ github.event.issue.number }}
|
||||
comment: 🤖 Auto-closing issue, if you still need help please reopen the issue or ask for help in the community above
|
||||
labels: |
|
||||
triage/accepted
|
||||
@@ -0,0 +1,52 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
name: Create Tag
|
||||
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
pull_request_review_comment:
|
||||
types: [created]
|
||||
|
||||
jobs:
|
||||
create_tag:
|
||||
runs-on: ubuntu-latest
|
||||
if: startsWith(github.event.comment.body, '/create tag')
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Validate version number and get comment
|
||||
id: validate
|
||||
run: |
|
||||
COMMENT="${{ github.event.comment.body }}"
|
||||
VERSION=$(echo $COMMENT | cut -d ' ' -f 3)
|
||||
TAG_COMMENT=$(echo $COMMENT | cut -d '"' -f 2)
|
||||
if [[ $VERSION =~ ^v([0-9]+\.){2}[0-9]+$ ]]; then
|
||||
echo "version=$VERSION" >> $GITHUB_STATE
|
||||
echo "tag_comment=$TAG_COMMENT" >> $GITHUB_STATE
|
||||
else
|
||||
echo "Invalid version number."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Create a new tag
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
|
||||
run: |
|
||||
source $GITHUB_STATE
|
||||
git tag -a $VERSION -m "$tag_comment"
|
||||
git push origin $VERSION
|
||||
echo "tag_created=$VERSION" >> $GITHUB_OUTPUT
|
||||
@@ -0,0 +1,67 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
name: 'Github Rebot for Cherry Pick when PR is merged'
|
||||
on:
|
||||
pull_request_target:
|
||||
types:
|
||||
- closed
|
||||
|
||||
jobs:
|
||||
comment:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Comment cherry-pick command
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
script: |
|
||||
const pr = context.payload.pull_request;
|
||||
if (!pr.merged) {
|
||||
console.log("PR is not merged. Skipping...");
|
||||
return;
|
||||
}
|
||||
if (!pr.milestone || !pr.milestone.title) {
|
||||
console.log("Milestone is not set. Skipping...");
|
||||
return;
|
||||
}
|
||||
const milestone = pr.milestone.title;
|
||||
const ref = `heads/release-${milestone}`;
|
||||
let branchExists;
|
||||
try {
|
||||
await github.rest.git.getRef({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
ref: ref
|
||||
});
|
||||
branchExists = true;
|
||||
} catch (error) {
|
||||
if (error.status === 404) {
|
||||
console.log(`Branch ${ref} does not exist. Skipping...`);
|
||||
branchExists = false;
|
||||
} else {
|
||||
throw error; // Rethrow if it's another error
|
||||
}
|
||||
}
|
||||
if (!branchExists) {
|
||||
return;
|
||||
}
|
||||
const cherryPickCmd = `/cherry-pick release-${milestone}`;
|
||||
console.log(`Adding comment: ${cherryPickCmd}`);
|
||||
await github.rest.issues.createComment({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: pr.number,
|
||||
body: cherryPickCmd
|
||||
});
|
||||
github-token: ${{ secrets.BOT_GITHUB_TOKEN }}
|
||||
@@ -0,0 +1,33 @@
|
||||
# Copyright © 2023 OpenIM open source community. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
name: Github Rebot for Cherry Pick On Comment
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
jobs:
|
||||
cherry-pick:
|
||||
name: Cherry Pick
|
||||
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/cherry-pick') && github.event.comment.user.login=='kubbot'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout the latest code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
token: ${{ secrets.BOT_GITHUB_TOKEN }}
|
||||
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
|
||||
- name: Automatic Cherry Pick
|
||||
uses: vendoo/gha-cherry-pick@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
|
||||
@@ -0,0 +1,137 @@
|
||||
# Copyright © 2023 OpenIM open source community. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
name: Publish Docker image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- release-*
|
||||
tags:
|
||||
- v*
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
# Common versions
|
||||
GO_VERSION: "1.20"
|
||||
|
||||
jobs:
|
||||
build-dockerhub:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
# docker.io/openim/openim-server:latest
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4.6.0
|
||||
with:
|
||||
images: openim/openim-server
|
||||
# generate Docker tags based on the following events/attributes
|
||||
tags: |
|
||||
type=schedule
|
||||
type=ref,event=branch
|
||||
type=ref,event=pr
|
||||
type=semver,pattern={{version}}
|
||||
type=semver,pattern={{major}}.{{minor}}
|
||||
type=semver,pattern={{major}}
|
||||
type=sha
|
||||
|
||||
- name: Log in to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
# linux/ppc64le,linux/s390x
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
|
||||
build-aliyun:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
# registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-server:latest
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
id: meta2
|
||||
uses: docker/metadata-action@v4.6.0
|
||||
with:
|
||||
images: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-server
|
||||
|
||||
- name: Log in to AliYun Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: registry.cn-hangzhou.aliyuncs.com
|
||||
username: ${{ secrets.ALIREGISTRY_USERNAME }}
|
||||
password: ${{ secrets.ALIREGISTRY_TOKEN }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
# linux/ppc64le,linux/s390x
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta2.outputs.tags }}
|
||||
labels: ${{ steps.meta2.outputs.labels }}
|
||||
|
||||
build-ghcr:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
# ghcr.io/openimsdk/openim-server:latest
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
id: meta3
|
||||
uses: docker/metadata-action@v4.6.0
|
||||
with:
|
||||
images: ghcr.io/openimsdk/openim-server
|
||||
|
||||
- name: Log in to GitHub Container Registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
# linux/ppc64le,linux/s390x
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta3.outputs.tags }}
|
||||
labels: ${{ steps.meta3.outputs.labels }}
|
||||
@@ -0,0 +1,59 @@
|
||||
# Copyright © 2023 OpenIM open source community. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
name: Check-Coverage
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
paths-ignore:
|
||||
- "docs/**"
|
||||
- "**/*.md"
|
||||
- "**/*.yaml"
|
||||
- "CONTRIBUTORS"
|
||||
- "CHANGELOG/**"
|
||||
pull_request:
|
||||
branches: [ "*" ]
|
||||
paths-ignore:
|
||||
- "docs/**"
|
||||
- "**/*.md"
|
||||
- "**/*.yaml"
|
||||
- "CONTRIBUTORS"
|
||||
- "CHANGELOG/**"
|
||||
env:
|
||||
# Common versions
|
||||
GO_VERSION: "1.20"
|
||||
|
||||
jobs:
|
||||
coverage:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Golang with cache
|
||||
uses: magnetikonline/action-golang-cache@v4
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
|
||||
- name: Install Dependencies
|
||||
run: sudo apt update && sudo apt install -y libgpgme-dev libbtrfs-dev libdevmapper-dev
|
||||
|
||||
- name: Run Cover
|
||||
run: make cover
|
||||
continue-on-error: true
|
||||
|
||||
- name: Upload Coverage to Codecov
|
||||
uses: codecov/codecov-action@v3
|
||||
@@ -1,40 +0,0 @@
|
||||
name: CLA Assistant
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
pull_request_target:
|
||||
types: [opened,closed,synchronize]
|
||||
|
||||
# explicitly configure permissions, in case your GITHUB_TOKEN workflow permissions are set to read-only in repository settings
|
||||
permissions:
|
||||
actions: write
|
||||
contents: write # this can be 'read' if the signatures are in remote repository
|
||||
pull-requests: write
|
||||
statuses: write
|
||||
|
||||
jobs:
|
||||
CLA-Assistant:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "CLA Assistant"
|
||||
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
|
||||
uses: contributor-assistant/github-action@v2.4.0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
PERSONAL_ACCESS_TOKEN: ${{ secrets.BOT_TOKEN }}
|
||||
with:
|
||||
path-to-signatures: 'signatures/cla.json'
|
||||
path-to-document: 'https://github.com/OpenIM-Robot/cla/blob/main/README.md' # e.g. a CLA or a DCO document
|
||||
branch: 'main'
|
||||
allowlist: 'bot*,*bot,OpenIM-Robot'
|
||||
|
||||
# the followings are the optional inputs - If the optional inputs are not given, then default values will be taken
|
||||
remote-organization-name: OpenIM-Robot
|
||||
remote-repository-name: cla
|
||||
create-file-commit-message: 'Creating file for storing CLA Signatures'
|
||||
# signed-commit-message: '$contributorName has signed the CLA in $owner/$repo#$pullRequestNo'
|
||||
custom-notsigned-prcomment: '💕 Thank you for your contribution and please kindly read and sign our CLA. [CLA Docs](https://github.com/OpenIM-Robot/cla/blob/main/README.md)'
|
||||
custom-pr-sign-comment: 'I have read the CLA Document and I hereby sign the CLA'
|
||||
custom-allsigned-prcomment: '🤖 All Contributors have signed the [CLA](https://github.com/OpenIM-Robot/cla/blob/main/README.md).<br> The signed information is recorded [**here**](https://github.com/OpenIM-Robot/cla/blob/main/signatures/cla.json)'
|
||||
#lock-pullrequest-aftermerge: false - if you don't want this bot to automatically lock the pull request after merging (default - true)
|
||||
#use-dco-flag: true - If you are using DCO instead of CLA
|
||||
@@ -0,0 +1,62 @@
|
||||
# Copyright © 2023 OpenIM open source community. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
name: "OpenIM CLA Assistant"
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
pull_request_target:
|
||||
types: [opened,closed,synchronize]
|
||||
|
||||
# explicitly configure permissions, in case your GITHUB_TOKEN workflow permissions are set to read-only in repository settings
|
||||
permissions:
|
||||
actions: write
|
||||
contents: write
|
||||
pull-requests: write
|
||||
statuses: write
|
||||
|
||||
env:
|
||||
# Define Open-IM-Server variables here
|
||||
OPEN_IM_SERVER_REMOTE_ORGANIZATION: openim-sigs
|
||||
REMOTE_REPOSITORY: cla
|
||||
OPEN_IM_SERVER_CLA_DOCUMENT: https://github.com/openim-sigs/cla/blob/main/README.md
|
||||
OPEN_IM_SERVER_SIGNATURES_PATH: signatures/${{ github.event.repository.name }}/cla.json
|
||||
|
||||
OPEN_IM_SERVER_ALLOWLIST: kubbot,bot*
|
||||
|
||||
jobs:
|
||||
CLAAssistant:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "CLA Assistant"
|
||||
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
|
||||
uses: contributor-assistant/github-action@v2.3.0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
|
||||
PERSONAL_ACCESS_TOKEN: ${{ secrets.REDBOT_GITHUB_TOKEN }}
|
||||
with:
|
||||
path-to-signatures: ${{ env.OPEN_IM_SERVER_SIGNATURES_PATH }}
|
||||
path-to-document: ${{ env.OPEN_IM_SERVER_CLA_DOCUMENT }}
|
||||
branch: 'main'
|
||||
allowlist: ${{ env.OPEN_IM_SERVER_ALLOWLIST }}
|
||||
|
||||
remote-organization-name: ${{ env.OPEN_IM_SERVER_REMOTE_ORGANIZATION }}
|
||||
remote-repository-name: ${{ env.REMOTE_REPOSITORY }}
|
||||
|
||||
create-file-commit-message: '📚 Docs: Creating file for storing ${{ github.event.repository.name }} CLA Signatures'
|
||||
custom-notsigned-prcomment: '💕 Thank you for your contribution and please kindly read and sign our [🎯https://github.com/openim-sigs/cla/blob/main/README.md](https://github.com/openim-sigs/cla/blob/main/README.md). <br> If you wish to sign the CRA, **Please copy and comment on the following sentence:**'
|
||||
custom-pr-sign-comment: 'I have read the CLA Document and I hereby sign the CLA'
|
||||
custom-allsigned-prcomment: '🤖 All Contributors have signed the [${{ github.event.repository.name }} CLA](https://github.com/openim-sigs/cla/blob/main/README.md).<br> The signed information is recorded [🤖here](https://github.com/openim-sigs/cla/tree/main/signatures/${{ github.event.repository.name }}/cla.json)'
|
||||
# lock-pullrequest-aftermerge: false - if you don't want this bot to automatically lock the pull request after merging (default - true)
|
||||
# use-dco-flag: true - If you are using DCO instead of CLA
|
||||
@@ -1,67 +1,76 @@
|
||||
# For most projects, this workflow file will not need changing; you simply need
|
||||
# to commit it to your repository.
|
||||
# Copyright © 2023 OpenIM open source community. All rights reserved.
|
||||
#
|
||||
# You may wish to alter this file to override the set of languages analyzed,
|
||||
# or to provide custom queries or build logic.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# ******** NOTE ********
|
||||
# We have attempted to detect the languages in your repository. Please check
|
||||
# the `language` matrix defined below to confirm you have the correct set of
|
||||
# supported CodeQL languages.
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
name: "CodeQL"
|
||||
|
||||
name: "OpenIM Code Scanning - Action"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
branches: [main]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [ main ]
|
||||
branches: [main]
|
||||
schedule:
|
||||
- cron: '18 19 * * 6'
|
||||
# ┌───────────── minute (0 - 59)
|
||||
# │ ┌───────────── hour (0 - 23)
|
||||
# │ │ ┌───────────── day of the month (1 - 31)
|
||||
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
|
||||
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
|
||||
# │ │ │ │ │
|
||||
# │ │ │ │ │
|
||||
# │ │ │ │ │
|
||||
# * * * * *
|
||||
- cron: '30 1 * * 0'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
CodeQL-Build:
|
||||
# CodeQL runs on ubuntu-latest, windows-latest, and macos-latest
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: [ 'go' ]
|
||||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
|
||||
# Learn more:
|
||||
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
|
||||
permissions:
|
||||
# required for all workflows
|
||||
security-events: write
|
||||
|
||||
# only required for workflows in private repositories
|
||||
actions: write
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v3
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
# Override language selection by uncommenting this and choosing your languages
|
||||
with:
|
||||
languages: go
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v3
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below).
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v2
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
||||
|
||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||
# and modify them (or add more) to build your code if your project
|
||||
# uses a compiled language
|
||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following
|
||||
# three lines and modify them (or add more) to build your code if your
|
||||
# project uses a compiled language
|
||||
|
||||
#- run: |
|
||||
# make bootstrap
|
||||
# make release
|
||||
# - run: |
|
||||
# make bootstrap
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v3
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v2
|
||||
@@ -1,51 +0,0 @@
|
||||
name: Non-English Comments Check
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
non-english-comments-check:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
env:
|
||||
# need ignore Dirs
|
||||
EXCLUDE_DIRS: ".git docs tests scripts assets node_modules build"
|
||||
# need ignore Files
|
||||
EXCLUDE_FILES: "*.md *.txt *.html *.css *.min.js *.mdx"
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Search for Non-English comments
|
||||
run: |
|
||||
set -e
|
||||
# Define the regex pattern to match Chinese characters
|
||||
pattern='[\p{Han}]'
|
||||
|
||||
# Process the directories to be excluded
|
||||
exclude_dirs=""
|
||||
for dir in $EXCLUDE_DIRS; do
|
||||
exclude_dirs="$exclude_dirs --exclude-dir=$dir"
|
||||
done
|
||||
|
||||
# Process the file types to be excluded
|
||||
exclude_files=""
|
||||
for file in $EXCLUDE_FILES; do
|
||||
exclude_files="$exclude_files --exclude=$file"
|
||||
done
|
||||
|
||||
# Use grep to find all comments containing Non-English characters and save to file
|
||||
grep -Pnr "$pattern" . $exclude_dirs $exclude_files > non_english_comments.txt || true
|
||||
|
||||
- name: Output non-English comments are found
|
||||
run: |
|
||||
if [ -s non_english_comments.txt ]; then
|
||||
echo "Non-English comments found in the following locations:"
|
||||
cat non_english_comments.txt
|
||||
exit 1 # terminate the workflow
|
||||
else
|
||||
echo "No Non_English comments found."
|
||||
fi
|
||||
@@ -0,0 +1,76 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
name: Create Branch on Tag
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*.*.0'
|
||||
|
||||
jobs:
|
||||
create-branch:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Git
|
||||
run: |
|
||||
git config --global user.name 'kubbot'
|
||||
git config --global user.email '3293172751yxy@gmail.com'
|
||||
|
||||
- name: Install git-chglog
|
||||
run: make install.git-chglog
|
||||
|
||||
- name: Create Branch
|
||||
run: |
|
||||
TAG_NAME=${GITHUB_REF/refs\/tags\//}
|
||||
IFS='.' read -ra VERSION_PARTS <<< "$TAG_NAME"
|
||||
if [[ "${VERSION_PARTS[2]}" = "0" ]]; then
|
||||
BRANCH_NAME="release-v${VERSION_PARTS[0]}.${VERSION_PARTS[1]}"
|
||||
echo "Creating branch $BRANCH_NAME"
|
||||
git checkout -b "$BRANCH_NAME"
|
||||
git push origin "$BRANCH_NAME"
|
||||
fi
|
||||
|
||||
- name: Push Changes
|
||||
uses: stefanzweifel/git-auto-commit-action@v4
|
||||
with:
|
||||
commit_message: "Auto Commit CHANGELOG"
|
||||
branch: release-v${VERSION_PARTS[0]}.${VERSION_PARTS[1]}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
|
||||
|
||||
- name: Create and Push CHANGELOG
|
||||
run: |
|
||||
git checkout main
|
||||
TAG_NAME=${GITHUB_REF/refs\/tags\//}
|
||||
IFS='.' read -ra VERSION_PARTS <<< "$TAG_NAME"
|
||||
if [[ "${VERSION_PARTS[2]}" = "0" ]]; then
|
||||
cd CHANGELOG
|
||||
git-chglog --tag-filter-pattern "v${VERSION_PARTS[0]}.${VERSION_PARTS[1]}.*" -o "CHANGELOG-${VERSION_PARTS[0]}.${VERSION_PARTS[1]}.md"
|
||||
git add "CHANGELOG-${VERSION_PARTS[0]}.${VERSION_PARTS[1]}.md"
|
||||
git commit -m "Update CHANGELOG for $TAG_NAME"
|
||||
fi
|
||||
|
||||
- name: Push Changes
|
||||
uses: stefanzweifel/git-auto-commit-action@v4
|
||||
with:
|
||||
commit_message: "Auto Commit CHANGELOG"
|
||||
branch: main
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
|
||||
@@ -0,0 +1,55 @@
|
||||
# Copyright © 2023 OpenIM open source community. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
name: OpenIM Deploy for dev
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'devops' # Only for the dev branch
|
||||
- 'main'
|
||||
paths:
|
||||
- '.github/workflows/*'
|
||||
# - '__test__/**' # dev No immediate testing is required
|
||||
- 'src/**'
|
||||
- 'Dockerfile'
|
||||
- 'docker-compose.yml'
|
||||
- 'bin/*'
|
||||
|
||||
jobs:
|
||||
deploy-dev:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: executing remote ssh commands using password
|
||||
uses: appleboy/ssh-action@v1.0.0
|
||||
env:
|
||||
OWNER: ${{ github.repository_owner }}
|
||||
REPO: ${{ github.event.repository.name }}
|
||||
with:
|
||||
host: "${{ secrets.SG_M1_HOST }}, ${{ secrets.SG_N1_HOST }}, ${{ secrets.SG_N2_HOST}}"
|
||||
username: ${{ secrets.SG_USERNAME }}
|
||||
password: ${{ secrets.SG_PASSWORD }}
|
||||
port: ${{ secrets.SG_PORT }}
|
||||
envs: OWNER,REPO
|
||||
script_stop: true
|
||||
script: |
|
||||
mkdir -p /test/openim
|
||||
cd /test/openim
|
||||
pwd;ls -al
|
||||
echo "OWNER: $OWNER"
|
||||
echo "REPO: $REPO"
|
||||
git clone -b develop https://github.com/${OWNER}/${REPO}.git; cd ${REPO}
|
||||
docker compose up -d
|
||||
continue-on-error: true
|
||||
@@ -0,0 +1,18 @@
|
||||
# Copyright © 2023 KubeCub open source community. All rights reserved.
|
||||
# Licensed under the MIT License (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
|
||||
name: Dependency Review
|
||||
on: [pull_request]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
dependency-review:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: 'Checkout Repository'
|
||||
uses: actions/checkout@v3
|
||||
- name: 'Dependency Review'
|
||||
uses: actions/dependency-review-action@v3
|
||||
@@ -0,0 +1,320 @@
|
||||
# Copyright © 2023 OpenIM open source community. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
name: Docker Buildx Images CI
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '30 1 * * *'
|
||||
push:
|
||||
branches:
|
||||
- release-*
|
||||
tags:
|
||||
- v*
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build-ghcr:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
with:
|
||||
install: true
|
||||
|
||||
- name: Cache Docker layers
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: /tmp/.buildx-cache
|
||||
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-buildx-
|
||||
|
||||
- name: Log in to GitHub Container Registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
################################################
|
||||
# build/
|
||||
# └── docker
|
||||
# ├── openim-api
|
||||
# │ └── Dockerfile
|
||||
# ├── openim-cmdutils
|
||||
# │ └── Dockerfile
|
||||
# ├── openim-crontask
|
||||
# │ └── Dockerfile
|
||||
# ├── openim-msggateway
|
||||
# │ └── Dockerfile
|
||||
# ├── openim-msgtransfer
|
||||
# │ └── Dockerfile
|
||||
# ├── openim-push
|
||||
# │ └── Dockerfile
|
||||
# ├── openim-rpc-auth
|
||||
# │ └── Dockerfile
|
||||
# ├── openim-rpc-conversation
|
||||
# │ └── Dockerfile
|
||||
# ├── openim-rpc-friend
|
||||
# │ └── Dockerfile
|
||||
# ├── openim-rpc-group
|
||||
# │ └── Dockerfile
|
||||
# ├── openim-rpc-msg
|
||||
# │ └── Dockerfile
|
||||
# ├── openim-rpc-third
|
||||
# │ └── Dockerfile
|
||||
# └── openim-rpc-user
|
||||
# └── Dockerfile
|
||||
#############################################
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker openim-api
|
||||
id: meta1
|
||||
uses: docker/metadata-action@v4.6.0
|
||||
with:
|
||||
images: ghcr.io/openimsdk/openim-api
|
||||
|
||||
- name: Build and push Docker image for openim-api
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
file: ./build/images/openim-api/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta1.outputs.tags }}
|
||||
labels: ${{ steps.meta1.outputs.labels }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker openim-cmdutils
|
||||
id: meta2
|
||||
uses: docker/metadata-action@v4.6.0
|
||||
with:
|
||||
images: ghcr.io/openimsdk/openim-cmdutils
|
||||
|
||||
- name: Build and push Docker image for openim-cmdutils
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
file: ./build/images/openim-cmdutils/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta2.outputs.tags }}
|
||||
labels: ${{ steps.meta2.outputs.labels }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker openim-crontask
|
||||
id: meta3
|
||||
uses: docker/metadata-action@v4.6.0
|
||||
with:
|
||||
images: ghcr.io/openimsdk/openim-crontask
|
||||
|
||||
- name: Build and push Docker image for openim-crontask
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
file: ./build/images/openim-crontask/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta3.outputs.tags }}
|
||||
labels: ${{ steps.meta3.outputs.labels }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker openim-msggateway
|
||||
id: meta4
|
||||
uses: docker/metadata-action@v4.6.0
|
||||
with:
|
||||
images: ghcr.io/openimsdk/openim-msggateway
|
||||
|
||||
- name: Build and push Docker image for openim-msggateway
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
file: ./build/images/openim-msggateway/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta4.outputs.tags }}
|
||||
labels: ${{ steps.meta4.outputs.labels }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker openim-msgtransfer
|
||||
id: meta5
|
||||
uses: docker/metadata-action@v4.6.0
|
||||
with:
|
||||
images: ghcr.io/openimsdk/openim-msgtransfer
|
||||
|
||||
- name: Build and push Docker image for openim-msgtransfer
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
file: ./build/images/openim-msgtransfer/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta5.outputs.tags }}
|
||||
labels: ${{ steps.meta5.outputs.labels }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker openim-push
|
||||
id: meta6
|
||||
uses: docker/metadata-action@v4.6.0
|
||||
with:
|
||||
images: ghcr.io/openimsdk/openim-push
|
||||
|
||||
- name: Build and push Docker image for openim-push
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
file: ./build/images/openim-push/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta6.outputs.tags }}
|
||||
labels: ${{ steps.meta6.outputs.labels }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker openim-rpc-auth
|
||||
id: meta7
|
||||
uses: docker/metadata-action@v4.6.0
|
||||
with:
|
||||
images: ghcr.io/openimsdk/openim-rpc-auth
|
||||
|
||||
- name: Build and push Docker image for openim-rpc-auth
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
file: ./build/images/openim-rpc-auth/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta7.outputs.tags }}
|
||||
labels: ${{ steps.meta7.outputs.labels }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker openim-rpc-conversation
|
||||
id: meta8
|
||||
uses: docker/metadata-action@v4.6.0
|
||||
with:
|
||||
images: ghcr.io/openimsdk/openim-rpc-conversation
|
||||
|
||||
- name: Build and push Docker image for openim-rpc-conversation
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
file: ./build/images/openim-rpc-conversation/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta8.outputs.tags }}
|
||||
labels: ${{ steps.meta8.outputs.labels }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker openim-rpc-friend
|
||||
id: meta9
|
||||
uses: docker/metadata-action@v4.6.0
|
||||
with:
|
||||
images: ghcr.io/openimsdk/openim-rpc-friend
|
||||
|
||||
- name: Build and push Docker image for openim-rpc-friend
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
file: ./build/images/openim-rpc-friend/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta9.outputs.tags }}
|
||||
labels: ${{ steps.meta9.outputs.labels }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker openim-rpc-group
|
||||
id: meta10
|
||||
uses: docker/metadata-action@v4.6.0
|
||||
with:
|
||||
images: ghcr.io/openimsdk/openim-rpc-group
|
||||
|
||||
- name: Build and push Docker image for openim-rpc-group
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
file: ./build/images/openim-rpc-group/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta10.outputs.tags }}
|
||||
labels: ${{ steps.meta10.outputs.labels }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker openim-rpc-msg
|
||||
id: meta11
|
||||
uses: docker/metadata-action@v4.6.0
|
||||
with:
|
||||
images: ghcr.io/openimsdk/openim-rpc-msg
|
||||
|
||||
- name: Build and push Docker image for openim-rpc-msg
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
file: ./build/images/openim-rpc-msg/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta11.outputs.tags }}
|
||||
labels: ${{ steps.meta11.outputs.labels }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker openim-rpc-third
|
||||
id: meta12
|
||||
uses: docker/metadata-action@v4.6.0
|
||||
with:
|
||||
images: ghcr.io/openimsdk/openim-rpc-third
|
||||
|
||||
- name: Build and push Docker image for openim-rpc-third
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
file: ./build/images/openim-rpc-third/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta12.outputs.tags }}
|
||||
labels: ${{ steps.meta12.outputs.labels }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker openim-rpc-user
|
||||
id: meta13
|
||||
uses: docker/metadata-action@v4.6.0
|
||||
with:
|
||||
images: ghcr.io/openimsdk/openim-rpc-user
|
||||
|
||||
- name: Build and push Docker image for openim-rpc-user
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
file: ./build/images/openim-rpc-user/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta13.outputs.tags }}
|
||||
labels: ${{ steps.meta13.outputs.labels }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
@@ -0,0 +1,44 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
name: e2e
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
push:
|
||||
schedule:
|
||||
# run e2e test every 4 hours
|
||||
- cron: 0 */4 * * *
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Test
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
GO111MODULE: on
|
||||
steps:
|
||||
|
||||
- name: Set up Go 1.21
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.21
|
||||
id: go
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Create e2e test
|
||||
run: |
|
||||
echo "...test e2e"
|
||||
@@ -1,197 +0,0 @@
|
||||
name: Go Build Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
go-build:
|
||||
name: Test with go ${{ matrix.go_version }} on ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
go_version: ["1.21.x", "1.22.x"]
|
||||
|
||||
steps:
|
||||
- name: Checkout Server repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Go ${{ matrix.go_version }}
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{ matrix.go_version }}
|
||||
|
||||
- name: Get Server dependencies
|
||||
run: |
|
||||
go install github.com/magefile/mage@latest
|
||||
go mod tidy
|
||||
go mod download
|
||||
|
||||
- name: Set up infra services
|
||||
uses: hoverkraft-tech/compose-action@v2.0.1
|
||||
# Uncomment and set the correct path to your docker-compose file
|
||||
with:
|
||||
compose-file: "./docker-compose.yml"
|
||||
|
||||
# run: |
|
||||
# sudo docker compose up -d
|
||||
# sudo sleep 30 # Increased sleep time for better stability
|
||||
# timeout-minutes: 60 # Increased timeout for Docker setup
|
||||
|
||||
|
||||
# - name: Get Internal IP Address
|
||||
# id: get-ip
|
||||
# run: |
|
||||
# IP=$(hostname -I | awk '{print $1}')
|
||||
# echo "The IP Address is: $IP"
|
||||
# echo "::set-output name=ip::$IP"
|
||||
|
||||
# - name: Update .env
|
||||
# run: |
|
||||
# sed -i 's|externalAddress:.*|externalAddress: "http://${{ steps.get-ip.outputs.ip }}:10005"|' config/minio.yml
|
||||
# cat config/minio.yml
|
||||
|
||||
- name: Build and test Server Services
|
||||
run: |
|
||||
mage build
|
||||
mage start
|
||||
mage check
|
||||
|
||||
- name: Checkout Chat repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: "openimsdk/chat"
|
||||
path: "chat-repo"
|
||||
|
||||
- name: Get Chat dependencies
|
||||
run: |
|
||||
cd ${{ github.workspace }}/chat-repo
|
||||
go mod tidy
|
||||
go mod download
|
||||
go install github.com/magefile/mage@latest
|
||||
|
||||
- name: Build and test Chat Services
|
||||
run: |
|
||||
cd ${{ github.workspace }}/chat-repo
|
||||
mage build
|
||||
mage start
|
||||
mage check
|
||||
|
||||
go-test:
|
||||
name: Benchmark Test with go ${{ matrix.go_version }} on ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
permissions:
|
||||
contents: write
|
||||
env:
|
||||
SDK_DIR: openim-sdk-core
|
||||
CONFIG_PATH: config/notification.yml
|
||||
# pull-requests: write
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ ubuntu-latest ]
|
||||
go_version: [ "1.22.x" ]
|
||||
|
||||
steps:
|
||||
- name: Checkout Server repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Checkout SDK repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: 'openimsdk/openim-sdk-core'
|
||||
path: ${{ env.SDK_DIR }}
|
||||
|
||||
- name: Set up Go ${{ matrix.go_version }}
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{ matrix.go_version }}
|
||||
|
||||
- name: Get Server dependencies
|
||||
run: |
|
||||
go install github.com/magefile/mage@latest
|
||||
go mod download
|
||||
|
||||
- name: Install yq
|
||||
run: |
|
||||
sudo wget https://github.com/mikefarah/yq/releases/download/v4.34.1/yq_linux_amd64 -O /usr/bin/yq
|
||||
sudo chmod +x /usr/bin/yq
|
||||
|
||||
- name: Modify Server Configuration
|
||||
run: |
|
||||
yq e '.groupCreated.unreadCount = true' -i ${{ env.CONFIG_PATH }}
|
||||
yq e '.friendApplicationApproved.unreadCount = true' -i ${{ env.CONFIG_PATH }}
|
||||
|
||||
- name: Start Server Services
|
||||
run: |
|
||||
docker compose up -d
|
||||
mage build
|
||||
mage start
|
||||
mage check
|
||||
|
||||
- name: Build test SDK core
|
||||
run: |
|
||||
cd ${{ env.SDK_DIR }}
|
||||
go mod tidy
|
||||
cd integration_test
|
||||
mkdir data
|
||||
go run main.go -lgr 0.8 -imf -crg -ckgn -ckcon -sem -ckmsn -u 20 -su 5 -lg 2 -cg 2 -cgm 3 -sm 10 -gm 10 -reg
|
||||
|
||||
dockerfile-test:
|
||||
name: Build and Test Dockerfile
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
go_version: ["1.21"]
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Go ${{ matrix.go_version }}
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{ matrix.go_version }}
|
||||
|
||||
- name: Get dependencies
|
||||
run: |
|
||||
go mod tidy
|
||||
go mod download
|
||||
go install github.com/magefile/mage@latest
|
||||
|
||||
- name: Build Docker Image
|
||||
run: |
|
||||
IMAGE_NAME="${{ github.event.repository.name }}-test"
|
||||
CONTAINER_NAME="${{ github.event.repository.name }}-container"
|
||||
docker build -t $IMAGE_NAME .
|
||||
|
||||
- name: Run Docker Container
|
||||
run: |
|
||||
IMAGE_NAME="${{ github.event.repository.name }}-test"
|
||||
CONTAINER_NAME="${{ github.event.repository.name }}-container"
|
||||
docker run --name $CONTAINER_NAME -d $IMAGE_NAME
|
||||
docker ps -a
|
||||
|
||||
- name: Test Docker Container Logs
|
||||
run: |
|
||||
CONTAINER_NAME="${{ github.event.repository.name }}-container"
|
||||
docker logs $CONTAINER_NAME
|
||||
|
||||
# - name: Cleanup Docker Container
|
||||
# run: |
|
||||
# CONTAINER_NAME="${{ github.event.repository.name }}-container"
|
||||
# IMAGE_NAME="${{ github.event.repository.name }}-test"
|
||||
# docker stop $CONTAINER_NAME
|
||||
# docker rm $CONTAINER_NAME
|
||||
# docker rmi $IMAGE_NAME
|
||||
@@ -0,0 +1,50 @@
|
||||
# Copyright © 2023 OpenIM open source community. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
|
||||
name: OpenIM golangci-lint
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
jobs:
|
||||
golangci:
|
||||
name: lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: '1.21'
|
||||
cache: false
|
||||
- name: golangci-lint
|
||||
uses: golangci/golangci-lint-action@v3.7.0
|
||||
with:
|
||||
# Require: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
|
||||
version: v1.54
|
||||
|
||||
# Optional: working directory, useful for monorepos
|
||||
# working-directory: server
|
||||
|
||||
# Optional: golangci-lint command line arguments.
|
||||
#
|
||||
# Note: by default the `.golangci.yml` file should be at the root of the repository.
|
||||
# The location of the configuration file can be changed by using `--config=`
|
||||
# args: --timeout=30m --config=/scripts/.golangci.yml --issues-exit-code=0
|
||||
|
||||
# Optional: show only new issues if it's a pull request. The default value is `false`.
|
||||
only-new-issues: true
|
||||
|
||||
# Optional:The mode to install golangci-lint. It can be 'binary' or 'goinstall'.
|
||||
# install-mode: "goinstall"
|
||||
@@ -0,0 +1,45 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
name: OpenIM Run Gosec
|
||||
|
||||
# gosec is a source code security audit tool for the Go language. It performs a static
|
||||
# analysis of the Go code, looking for potential security problems. The main functions of gosec are:
|
||||
# 1. Find common security vulnerabilities, such as SQL injection, command injection, and cross-site scripting (XSS).
|
||||
# 2. Audit codes according to common security standards and find non-standard codes.
|
||||
# 3. Assist the Go language engineer to write safe and reliable code.
|
||||
# https://github.com/securego/gosec/
|
||||
on:
|
||||
push:
|
||||
branches: "*"
|
||||
pull_request:
|
||||
branches: "*"
|
||||
paths-ignore:
|
||||
- '*.md'
|
||||
- '*.yml'
|
||||
- '.github'
|
||||
|
||||
jobs:
|
||||
golang-security-action:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
GO111MODULE: on
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v3
|
||||
- name: Run Gosec Security Scanner
|
||||
uses: securego/gosec@master
|
||||
with:
|
||||
args: ./...
|
||||
continue-on-error: true
|
||||
@@ -1,4 +1,18 @@
|
||||
name: User First Interaction
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
name: first-interaction
|
||||
|
||||
on:
|
||||
issues:
|
||||
@@ -11,10 +25,10 @@ jobs:
|
||||
check_for_first_interaction:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/first-interaction@v1.3.0
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/first-interaction@v1.1.1
|
||||
with:
|
||||
repo-token: ${{ secrets.BOT_TOKEN }}
|
||||
repo-token: ${{ secrets.BOT_GITHUB_TOKEN }}
|
||||
pr-message: |
|
||||
Hello! Thank you for your contribution.
|
||||
|
||||
@@ -22,14 +36,12 @@ jobs:
|
||||
|
||||
If you are implementing a feature request, please check with the maintainers that the feature will be accepted first.
|
||||
|
||||
[Join slack 🤖](https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q) to connect and communicate with our developers.
|
||||
|
||||
Please leave your information in the [✨ discussions](https://github.com/orgs/OpenIMSDK/discussions/426), we expect anyone to join OpenIM developer community.
|
||||
[Join slack 🤖](https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg) to connect and communicate with our developers.
|
||||
|
||||
issue-message: |
|
||||
Hello! Thank you for filing an issue.
|
||||
|
||||
If this is a bug report, please include relevant logs to help us debug the problem.
|
||||
|
||||
[Join slack 🤖](https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q) to connect and communicate with our developers.
|
||||
[Join slack 🤖](https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg) to connect and communicate with our developers.
|
||||
continue-on-error: true
|
||||
@@ -17,7 +17,6 @@ on:
|
||||
issues:
|
||||
types:
|
||||
- labeled
|
||||
|
||||
jobs:
|
||||
add-comment:
|
||||
if: github.event.label.name == 'help wanted' || github.event.label.name == 'good first issue'
|
||||
@@ -26,11 +25,11 @@ jobs:
|
||||
issues: write
|
||||
steps:
|
||||
- name: Add comment
|
||||
uses: peter-evans/create-or-update-comment@v4
|
||||
uses: peter-evans/create-or-update-comment@v3
|
||||
with:
|
||||
issue-number: ${{ github.event.issue.number }}
|
||||
token: ${{ secrets.BOT_TOKEN }}
|
||||
token: ${{ secrets.BOT_GITHUB_TOKEN }}
|
||||
body: |
|
||||
This issue is available for anyone to work on. **Make sure to reference this issue in your pull request.** :sparkles: Thank you for your contribution! :sparkles:
|
||||
[Join slack 🤖](https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q) to connect and communicate with our developers.
|
||||
[Join slack 🤖](https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg) to connect and communicate with our developers.
|
||||
If you wish to accept this assignment, please leave a comment in the comments section: `/accept`.🎯
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
# Copyright © 2023 OpenIM open source community. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
name: 'issue translator'
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
issues:
|
||||
types: [opened]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: usthe/issues-translate-action@v2.7
|
||||
with:
|
||||
# it is not necessary to decide whether you need to modify the issue header content
|
||||
IS_MODIFY_TITLE: true
|
||||
BOT_GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
|
||||
# Required, input your bot github token
|
||||
@@ -1,19 +0,0 @@
|
||||
name: 'issue-translator'
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
issues:
|
||||
types: [opened]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: usthe/issues-translate-action@v2.7
|
||||
with:
|
||||
BOT_GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
|
||||
IS_MODIFY_TITLE: true
|
||||
# not require, default false, . Decide whether to modify the issue title
|
||||
# if true, the robot account @Issues-translate-bot must have modification permissions, invite @Issues-translate-bot to your project or use your custom bot.
|
||||
CUSTOM_BOT_NOTE: Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
|
||||
# not require. Customize the translation robot prefix message.
|
||||
@@ -0,0 +1,53 @@
|
||||
# Copyright © 2023 OpenIM open source community. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
name: Github Rebot for Link check error
|
||||
|
||||
# Every Monday at 12:30 p.m
|
||||
on:
|
||||
schedule:
|
||||
- cron: '30 12 * * 1'
|
||||
|
||||
jobs:
|
||||
linkChecker:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Link Checker
|
||||
id: lychee
|
||||
uses: lycheeverse/lychee-action@v1.8.0
|
||||
with:
|
||||
# For parameter description, see https://github.com/lycheeverse/lychee#commandline-parameters
|
||||
# Actions Link address -> https://github.com/lycheeverse/lychee-action
|
||||
# -E, --exclude-all-private Exclude all private IPs from checking.
|
||||
# -i, --insecure Proceed for server connections considered insecure (invalid TLS)
|
||||
# -n, --no-progress Do not show progress bar.
|
||||
# -t, --timeout <timeout> Website timeout in seconds from connect to response finished [default:20]
|
||||
# --max-concurrency <max-concurrency> Maximum number of concurrent network requests [default: 128]
|
||||
# -a --accept <accept> Comma-separated list of accepted status codes for valid links
|
||||
# docs/.vitepress/dist the site directory to check
|
||||
# ./*.md all markdown files in the root directory
|
||||
args: --verbose -E -i --no-progress --exclude-path './CHANGELOG' './**/*.md'
|
||||
env:
|
||||
GITHUB_TOKEN: ${{secrets.GH_PAT}}
|
||||
|
||||
- name: Create Issue From File
|
||||
if: env.lychee_exit_code != 0
|
||||
uses: peter-evans/create-issue-from-file@v4
|
||||
with:
|
||||
title: Bug reports for links in OpenIM docs
|
||||
content-filepath: ./lychee/out.md
|
||||
labels: kind/documentation, triage/unresolved, report
|
||||
token: ${{ secrets.BOT_GITHUB_TOKEN }}
|
||||
@@ -0,0 +1,65 @@
|
||||
# Copyright © 2023 OpenIM open source community. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
name: 'Lock Threads'
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 * * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
|
||||
concurrency:
|
||||
group: lock
|
||||
|
||||
jobs:
|
||||
action:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: dessant/lock-threads@v4
|
||||
with:
|
||||
github-token: ${{ secrets.BOT_GITHUB_TOKEN }}
|
||||
issue-inactive-days: '365'
|
||||
exclude-issue-created-before: ''
|
||||
exclude-issue-created-after: ''
|
||||
exclude-issue-created-between: ''
|
||||
exclude-issue-closed-before: ''
|
||||
exclude-issue-closed-after: ''
|
||||
exclude-issue-closed-between: ''
|
||||
include-any-issue-labels: ''
|
||||
include-all-issue-labels: ''
|
||||
exclude-any-issue-labels: ''
|
||||
add-issue-labels: ''
|
||||
remove-issue-labels: ''
|
||||
issue-comment: ''
|
||||
issue-lock-reason: 'resolved'
|
||||
pr-inactive-days: '365'
|
||||
exclude-pr-created-before: ''
|
||||
exclude-pr-created-after: ''
|
||||
exclude-pr-created-between: ''
|
||||
exclude-pr-closed-before: ''
|
||||
exclude-pr-closed-after: ''
|
||||
exclude-pr-closed-between: ''
|
||||
include-any-pr-labels: ''
|
||||
include-all-pr-labels: ''
|
||||
exclude-any-pr-labels: ''
|
||||
add-pr-labels: ''
|
||||
remove-pr-labels: ''
|
||||
pr-comment: ''
|
||||
pr-lock-reason: 'resolved'
|
||||
process-only: ''
|
||||
log-output: false
|
||||
@@ -0,0 +1,72 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# shamelessly copied from https://github.com/sigstore/cosign/blob/main/.github/workflows/milestone.yaml
|
||||
|
||||
name: milestone
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [closed]
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
milestone:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
permissions:
|
||||
actions: none
|
||||
checks: none
|
||||
contents: read
|
||||
deployments: none
|
||||
issues: write
|
||||
packages: none
|
||||
pull-requests: write
|
||||
repository-projects: none
|
||||
security-events: none
|
||||
statuses: none
|
||||
|
||||
steps:
|
||||
- uses: actions/github-script@v6 # v6
|
||||
with:
|
||||
script: |
|
||||
if (!context.payload.pull_request.merged) {
|
||||
console.log('PR was not merged, skipping.');
|
||||
return;
|
||||
}
|
||||
|
||||
if (!!context.payload.pull_request.milestone) {
|
||||
console.log('PR has existing milestone, skipping.');
|
||||
return;
|
||||
}
|
||||
|
||||
milestones = await github.rest.issues.listMilestones({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
state: 'open',
|
||||
sort: 'due_on',
|
||||
direction: 'asc'
|
||||
})
|
||||
if (milestones.data.length === 0) {
|
||||
console.log('There are no milestones, skipping.');
|
||||
return;
|
||||
}
|
||||
|
||||
await github.rest.issues.update({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: context.payload.pull_request.number,
|
||||
milestone: milestones.data[0].number
|
||||
});
|
||||
@@ -0,0 +1,52 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
name: 'OpenIM Commit Action'
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
opencommit:
|
||||
timeout-minutes: 10
|
||||
name: OpenCommit
|
||||
runs-on: ubuntu-latest
|
||||
permissions: write-all
|
||||
steps:
|
||||
- name: Setup Node.js Environment
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '16'
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: di-sukharev/opencommit@github-action-v1.0.4
|
||||
with:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
env:
|
||||
# set openAI api key in repo actions secrets,
|
||||
# for openAI keys go to: https://platform.openai.com/account/api-keys
|
||||
# for repo secret go to: https://github.com/kuebcub/settings/secrets/actions
|
||||
OCO_OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||||
|
||||
# customization
|
||||
OCO_OPENAI_MAX_TOKENS: 500
|
||||
OCO_OPENAI_BASE_PATH: ''
|
||||
OCO_DESCRIPTION: false
|
||||
OCO_EMOJI: false
|
||||
OCO_MODEL: gpt-3.5-turbo
|
||||
OCO_LANGUAGE: en
|
||||
@@ -0,0 +1,172 @@
|
||||
# Copyright © 2023 OpenIM open source community. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
name: OpenIM CI Aotu Build and Install
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths-ignore:
|
||||
- "docs/**"
|
||||
- "README.md"
|
||||
- "README_zh-CN.md"
|
||||
- "CONTRIBUTING.md"
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths-ignore:
|
||||
- "README.md"
|
||||
- "README_zh-CN.md"
|
||||
- "CONTRIBUTING.md"
|
||||
- "docs/**"
|
||||
|
||||
env:
|
||||
GO_VERSION: "1.19"
|
||||
GOLANGCI_VERSION: "v1.50.1"
|
||||
|
||||
|
||||
jobs:
|
||||
openim:
|
||||
name: Test with go ${{ matrix.go_version }} on ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
permissions:
|
||||
contents: write
|
||||
environment:
|
||||
name: openim
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
go_version: ["1.18","1.19","1.20","1.21"]
|
||||
os: [ubuntu-latest]
|
||||
|
||||
steps:
|
||||
- name: Setup
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Go ${{ matrix.go_version }}
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: ${{ matrix.go_version }}
|
||||
id: go
|
||||
|
||||
- name: Install Task
|
||||
uses: arduino/setup-task@v1
|
||||
with:
|
||||
version: 2.x
|
||||
|
||||
- name: Module Operations
|
||||
run: |
|
||||
sudo make tidy
|
||||
sudo make tools.verify.go-gitlint
|
||||
|
||||
- name: Format Code
|
||||
run: sudo make format
|
||||
continue-on-error: true
|
||||
|
||||
- name: Generate Files
|
||||
run: make gen
|
||||
continue-on-error: true
|
||||
|
||||
- name: Build Source
|
||||
run: sudo make build
|
||||
|
||||
- name: Cleanup Build
|
||||
run: sudo make clean
|
||||
|
||||
- name: Push Changes to Main
|
||||
uses: stefanzweifel/git-auto-commit-action@v4
|
||||
with:
|
||||
commit_message: "cicd: robot automated Change"
|
||||
branch: main
|
||||
continue-on-error: true
|
||||
|
||||
- name: Set Current Directory
|
||||
id: set_directory
|
||||
run: echo "::set-output name=directory::$(pwd)"
|
||||
continue-on-error: true
|
||||
|
||||
- name: Collect and Display Test Coverage
|
||||
id: collect_coverage
|
||||
run: |
|
||||
cd ${{ steps.set_directory.outputs.directory }}
|
||||
make cover
|
||||
echo "::set-output name=coverage_file::./_output/tmp/coverage.out"
|
||||
echo "Test Coverage:"
|
||||
cat ${{ steps.collect_coverage.outputs.coverage_file }}
|
||||
continue-on-error: true
|
||||
|
||||
openim-start:
|
||||
name: Test OpenIM install/start on ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
environment:
|
||||
name: openim
|
||||
strategy:
|
||||
matrix:
|
||||
go_version: ["1.21"]
|
||||
os: ["ubuntu-latest"]
|
||||
steps:
|
||||
- name: Checkout and Install OpenIM
|
||||
uses: actions/checkout@v3
|
||||
- name: Install Task
|
||||
uses: arduino/setup-task@v1
|
||||
with:
|
||||
version: 2.x
|
||||
- name: Run OpenIM make install start
|
||||
run: |
|
||||
sudo make install
|
||||
|
||||
execute-scripts:
|
||||
name: Execute OpenIM script on ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
environment:
|
||||
name: openim
|
||||
strategy:
|
||||
matrix:
|
||||
go_version: ["1.20"]
|
||||
os: ["ubuntu-latest"]
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Go ${{ matrix.go_version }}
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: ${{ matrix.go_version }}
|
||||
id: go
|
||||
- name: Install Task
|
||||
uses: arduino/setup-task@v1
|
||||
with:
|
||||
version: 2.x
|
||||
- name: Docker Operations
|
||||
run: |
|
||||
curl -o docker-compose.yaml https://raw.githubusercontent.com/OpenIMSDK/openim-docker/main/example/basic-openim-server-dependency.yml
|
||||
sudo docker compose up -d
|
||||
sudo sleep 60
|
||||
|
||||
- name: Module Operations
|
||||
run: |
|
||||
sudo make tidy
|
||||
sudo make tools.verify.go-gitlint
|
||||
|
||||
- name: Build, Start and Check Services
|
||||
run: |
|
||||
sudo make init
|
||||
sudo make build
|
||||
sudo make start
|
||||
sudo make check
|
||||
|
||||
- name: Print OpenIM Logs
|
||||
run: sudo cat ./_output/logs/* 2>/dev/null
|
||||
continue-on-error: true
|
||||
@@ -0,0 +1,36 @@
|
||||
# Copyright © 2023 OpenIM open source community. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# GitHub recommends pinning actions to a commit SHA.
|
||||
# To get a newer version, you will need to update the SHA.
|
||||
# You can also reference a tag or branch, but the action may change without warning.
|
||||
|
||||
name: Move assigned card
|
||||
on:
|
||||
issues:
|
||||
types:
|
||||
- assigned
|
||||
pull_request:
|
||||
types:
|
||||
- assigned
|
||||
|
||||
jobs:
|
||||
move-assigned-card:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: alex-page/github-project-automation-plus@v0.8.3
|
||||
with:
|
||||
project: openim-powerful
|
||||
column: In Progress
|
||||
repo-token: ${{ secrets.BOT_GITHUB_TOKEN }}
|
||||
@@ -1,145 +0,0 @@
|
||||
name: Publish Docker image to registries
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- release-*
|
||||
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
description: "Tag version to be used for Docker image"
|
||||
required: true
|
||||
default: "v3.8.0"
|
||||
|
||||
# env:
|
||||
# GO_VERSION: "1.21"
|
||||
|
||||
jobs:
|
||||
publish-docker-images:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
path: main-repo
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: ./main-repo
|
||||
load: true
|
||||
tags: "openim/openim-server:local"
|
||||
|
||||
- name: Checkout compose repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: "openimsdk/openim-docker"
|
||||
path: "compose-repo"
|
||||
|
||||
- name: Get Internal IP Address
|
||||
id: get-ip
|
||||
run: |
|
||||
IP=$(hostname -I | awk '{print $1}')
|
||||
echo "The IP Address is: $IP"
|
||||
echo "::set-output name=ip::$IP"
|
||||
|
||||
- name: Update .env to use the local image
|
||||
run: |
|
||||
sed -i 's|OPENIM_SERVER_IMAGE=.*|OPENIM_SERVER_IMAGE=openim/openim-server:local|' ${{ github.workspace }}/compose-repo/.env
|
||||
sed -i 's|MINIO_EXTERNAL_ADDRESS=.*|MINIO_EXTERNAL_ADDRESS=http://${{ steps.get-ip.outputs.ip }}:10005|' ${{ github.workspace }}/compose-repo/.env
|
||||
|
||||
- name: Start services using Docker Compose
|
||||
run: |
|
||||
cd ${{ github.workspace }}/compose-repo
|
||||
docker compose up -d
|
||||
sleep 60
|
||||
|
||||
# - name: Check openim-server health
|
||||
# run: |
|
||||
# timeout=300
|
||||
# interval=30
|
||||
# elapsed=0
|
||||
# while [[ $elapsed -le $timeout ]]; do
|
||||
# if ! docker exec openim-server mage check; then
|
||||
# echo "openim-server is not ready, waiting..."
|
||||
# sleep $interval
|
||||
# elapsed=$(($elapsed + $interval))
|
||||
# else
|
||||
# echo "Health check successful"
|
||||
# exit 0
|
||||
# fi
|
||||
# done
|
||||
# echo "Health check failed after 5 minutes"
|
||||
# exit 1
|
||||
|
||||
# - name: Check openim-chat health
|
||||
# if: success()
|
||||
# run: |
|
||||
# if ! docker exec openim-chat mage check; then
|
||||
# echo "openim-chat check failed"
|
||||
# exit 1
|
||||
# else
|
||||
# echo "Health check successful"
|
||||
# exit 0
|
||||
# fi
|
||||
|
||||
|
||||
- name: Extract metadata for Docker # (tags, labels)
|
||||
if: success()
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5.5.1
|
||||
with:
|
||||
images: |
|
||||
openim/openim-server
|
||||
ghcr.io/openimsdk/openim-server
|
||||
registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-server
|
||||
|
||||
# generate Docker tags based on the following events/attributes
|
||||
tags: |
|
||||
type=ref,event=tag
|
||||
type=schedule
|
||||
type=ref,event=branch
|
||||
type=ref,event=pr
|
||||
type=semver,pattern={{version}}
|
||||
type=semver,pattern=v{{version}}
|
||||
type=semver,pattern={{major}}.{{minor}}
|
||||
type=semver,pattern={{major}}
|
||||
type=sha
|
||||
|
||||
- name: Log in to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Log in to GitHub Container Registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Log in to Aliyun Container Registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: registry.cn-hangzhou.aliyuncs.com
|
||||
username: ${{ secrets.ALIREGISTRY_USERNAME }}
|
||||
password: ${{ secrets.ALIREGISTRY_TOKEN }}
|
||||
|
||||
- name: Build and push Docker images
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: ./main-repo
|
||||
push: true
|
||||
platforms: linux/amd64,linux/arm64
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
@@ -0,0 +1,122 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
name: Github Pull Request
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths-ignore:
|
||||
- 'README.md'
|
||||
- 'CONTRIBUTING.md'
|
||||
- 'docs/**'
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 2 * * *'
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Get League branch Patch
|
||||
run: |
|
||||
git config user.name 'openimbot'
|
||||
git config user.email 'openimsdk@qq.com'
|
||||
git checkout -b cicd/patch-${{ github.event.number }}
|
||||
- uses: actions/setup-node@v3
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v4
|
||||
- name: Run go modules tidy
|
||||
run: |
|
||||
sudo make tidy
|
||||
sudo make tools.verify.go-gitlint
|
||||
echo "Run go modules tidy successfully"
|
||||
|
||||
- name: Run go format
|
||||
run: |
|
||||
sudo make format
|
||||
echo "Run go format successfully"
|
||||
continue-on-error: true
|
||||
|
||||
- name: Run go lint
|
||||
run: |
|
||||
sudo make lint
|
||||
echo "Run go lint successfully"
|
||||
continue-on-error: true
|
||||
|
||||
- name: Generate all necessary files, such as error code files
|
||||
run: |
|
||||
make generate
|
||||
echo "Generate all necessary files successfully"
|
||||
continue-on-error: true
|
||||
|
||||
- name: Run unit test and get test coverage
|
||||
run: |
|
||||
make cover
|
||||
echo "Run unit test and get test coverage successfully"
|
||||
continue-on-error: true
|
||||
|
||||
# - name: Initialize CodeQL
|
||||
# uses: github/codeql-action/init@v2
|
||||
# with:
|
||||
# languages: go
|
||||
|
||||
# - name: Perform CodeQL Analysis
|
||||
# uses: github/codeql-action/analyze@v2
|
||||
|
||||
- name: OpenIM verify copyright
|
||||
run: |
|
||||
sudo make verify-copyright
|
||||
sudo make add-copyright
|
||||
echo "OpenIM verify successfully"
|
||||
continue-on-error: true
|
||||
|
||||
# - name: Commit code
|
||||
# run: |
|
||||
# git add .
|
||||
# git commit -m "cicd: bump League Patch to cicd/patch-${{ github.event.number }}"
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v5
|
||||
with:
|
||||
token: ${{ secrets.BOT_GITHUB_TOKEN }}
|
||||
commit-message: "cicd: bump League Patch to cicd/patch-${{ github.event.number }}"
|
||||
title: Bump League Patch to cicd/patch-${{ github.event.number }}
|
||||
author: kubbot <kubbot@3293172751ysy@gmail.com>
|
||||
signoff: false
|
||||
draft: false
|
||||
branch: "cicd/patch-${{ github.event.number }}"
|
||||
assignees: cubxxw
|
||||
reviewers: cubxxw
|
||||
delete-branch: true
|
||||
body: |
|
||||
Review criteria:
|
||||
|
||||
- [ ] Disenchanter can connect and issue actions
|
||||
|
||||
This is an automated PR. @ ${{ github.actor }}
|
||||
<sub>[workflow](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/.github/workflows/pull-request.yml).</sub>
|
||||
base: main
|
||||
labels: |
|
||||
kind/documentation
|
||||
enhancement
|
||||
report
|
||||
@@ -0,0 +1,55 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
name: Release Drafter
|
||||
|
||||
on:
|
||||
push:
|
||||
# branches to consider in the event; optional, defaults to all
|
||||
branches:
|
||||
- main
|
||||
# pull_request event is required only for autolabeler
|
||||
pull_request:
|
||||
# Only following types are handled by the action, but one can default to all as well
|
||||
# types: [opened, reopened, synchronize]
|
||||
# pull_request_target event is required for autolabeler to support PRs from forks
|
||||
# pull_request_target:
|
||||
# types: [opened, reopened, synchronize]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
update_release_draft:
|
||||
permissions:
|
||||
# write permission is required to create a github release
|
||||
contents: write
|
||||
# write permission is required for autolabeler
|
||||
# otherwise, read permission is required at least
|
||||
pull-requests: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# (Optional) GitHub Enterprise requires GHE_HOST variable set
|
||||
#- name: Set GHE_HOST
|
||||
# run: |
|
||||
# echo "GHE_HOST=${GITHUB_SERVER_URL##https:\/\/}" >> $GITHUB_ENV
|
||||
|
||||
# Drafts your next Release notes as Pull Requests are merged into "master"
|
||||
- uses: release-drafter/release-drafter@v5
|
||||
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
|
||||
# with:
|
||||
# config-name: my-config.yml
|
||||
# disable-autolabeler: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.REDBOT_GITHUB_TOKEN }}
|
||||
@@ -0,0 +1,81 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
name: OpenIM Server Release Workflow
|
||||
|
||||
on:
|
||||
push:
|
||||
# run only against tags
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
packages: write
|
||||
issues: write
|
||||
|
||||
jobs:
|
||||
goreleaser:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- run: git fetch --force --tags
|
||||
- uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: stable
|
||||
# More assembly might be required: Docker logins, GPG, etc. It all depends
|
||||
# on your needs.
|
||||
- uses: goreleaser/goreleaser-action@v4
|
||||
with:
|
||||
# either 'goreleaser' (default) or 'goreleaser-pro':
|
||||
distribution: goreleaser
|
||||
version: latest
|
||||
workdir: .
|
||||
args: release -f ./build/goreleaser.yaml --rm-dist --clean --release-footer-tmpl=scripts/template/footer.md.tmpl --release-header-tmpl=scripts/template/head.md.tmpl
|
||||
env:
|
||||
USERNAME: ${{ github.repository_owner }}
|
||||
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
|
||||
FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
|
||||
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro'
|
||||
# distribution:
|
||||
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
|
||||
|
||||
goreleaser-check-pkgs:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DOCKER_CLI_EXPERIMENTAL: "enabled"
|
||||
needs: [ goreleaser ]
|
||||
if: github.ref == 'refs/heads/main'
|
||||
strategy:
|
||||
matrix:
|
||||
format: [ deb, rpm, apk ]
|
||||
steps:
|
||||
- uses: actions/checkout@v3 # v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: arduino/setup-task@e26d8975574116b0097a1161e0fe16ba75d84c1c # v1
|
||||
with:
|
||||
version: 3.x
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
- uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2
|
||||
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
|
||||
with:
|
||||
path: |
|
||||
./_output/dist/*.deb
|
||||
./_output/dist/*.rpm
|
||||
./_output/dist/*.apk
|
||||
key: ${{ github.ref }}
|
||||
- run: task goreleaser:test:${{ matrix.format }}
|
||||
@@ -1,74 +0,0 @@
|
||||
name: Remove Unused Labels
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
cleanup:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
contents: read
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Fetch All Issues and PRs
|
||||
id: fetch_issues_prs
|
||||
uses: actions/github-script@v7.0.1
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
const issues = await github.paginate(github.rest.issues.listForRepo, {
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
state: 'all',
|
||||
per_page: 100
|
||||
});
|
||||
|
||||
const labelsInUse = new Set();
|
||||
issues.forEach(issue => {
|
||||
issue.labels.forEach(label => {
|
||||
labelsInUse.add(label.name);
|
||||
});
|
||||
});
|
||||
|
||||
return JSON.stringify(Array.from(labelsInUse));
|
||||
result-encoding: string
|
||||
|
||||
- name: Fetch All Labels
|
||||
id: fetch_labels
|
||||
uses: actions/github-script@v7.0.1
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
const labels = await github.paginate(github.rest.issues.listLabelsForRepo, {
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
per_page: 100
|
||||
});
|
||||
|
||||
return JSON.stringify(labels.map(label => label.name));
|
||||
result-encoding: string
|
||||
|
||||
- name: Remove Unused Labels
|
||||
uses: actions/github-script@v7.0.1
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
const labelsInUse = new Set(JSON.parse(process.env.LABELS_IN_USE));
|
||||
const allLabels = JSON.parse(process.env.ALL_LABELS);
|
||||
|
||||
const unusedLabels = allLabels.filter(label => !labelsInUse.has(label));
|
||||
|
||||
for (const label of unusedLabels) {
|
||||
await github.rest.issues.deleteLabel({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
name: label
|
||||
});
|
||||
console.log(`Deleted label: ${label}`);
|
||||
}
|
||||
env:
|
||||
LABELS_IN_USE: ${{ steps.fetch_issues_prs.outputs.result }}
|
||||
ALL_LABELS: ${{ steps.fetch_labels.outputs.result }}
|
||||
@@ -1,78 +0,0 @@
|
||||
name: Reopen and Update Stale Issues
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
reopen_stale_issues:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
contents: read
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Fetch Closed Issues with lifecycle/stale Label
|
||||
id: fetch_issues
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
const issues = await github.paginate(github.rest.issues.listForRepo, {
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
state: 'closed',
|
||||
labels: 'lifecycle/stale',
|
||||
per_page: 100
|
||||
});
|
||||
const issueNumbers = issues
|
||||
.filter(issue => !issue.pull_request) // exclude PR
|
||||
.map(issue => issue.number);
|
||||
console.log(`Fetched issues: ${issueNumbers}`);
|
||||
return issueNumbers;
|
||||
|
||||
- name: Set issue numbers
|
||||
id: set_issue_numbers
|
||||
run: |
|
||||
echo "ISSUE_NUMBERS=${{ steps.fetch_issues.outputs.result }}" >> $GITHUB_ENV
|
||||
echo "Issue numbers: ${{ steps.fetch_issues.outputs.result }}"
|
||||
|
||||
- name: Reopen Issues
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
const issueNumbers = JSON.parse(process.env.ISSUE_NUMBERS);
|
||||
console.log(`Reopening issues: ${issueNumbers}`);
|
||||
|
||||
for (const issue_number of issueNumbers) {
|
||||
// Reopen the issue
|
||||
await github.rest.issues.update({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: issue_number,
|
||||
state: 'open'
|
||||
});
|
||||
console.log(`Reopened issue #${issue_number}`);
|
||||
}
|
||||
|
||||
- name: Remove lifecycle/stale Label
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
const issueNumbers = JSON.parse(process.env.ISSUE_NUMBERS);
|
||||
console.log(`Removing 'lifecycle/stale' label from issues: ${issueNumbers}`);
|
||||
|
||||
for (const issue_number of issueNumbers) {
|
||||
// Remove the lifecycle/stale label
|
||||
await github.rest.issues.removeLabel({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: issue_number,
|
||||
name: 'lifecycle/stale'
|
||||
});
|
||||
console.log(`Removed label 'lifecycle/stale' from issue #${issue_number}`);
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
name: OpenIM executes the script validation code
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths-ignore:
|
||||
- "docs/**"
|
||||
- "README.md"
|
||||
- "README_zh-CN.md"
|
||||
- "CONTRIBUTING.md"
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths-ignore:
|
||||
- "README.md"
|
||||
- "README_zh-CN.md"
|
||||
- "CONTRIBUTING.md"
|
||||
- "docs/**"
|
||||
|
||||
env:
|
||||
GO_VERSION: "1.19"
|
||||
GOLANGCI_VERSION: "v1.50.1"
|
||||
|
||||
jobs:
|
||||
openim:
|
||||
name: Test with go ${{ matrix.go_version }} on ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
permissions:
|
||||
contents: write
|
||||
environment:
|
||||
name: openim
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
go_version: ["1.21"]
|
||||
os: [ubuntu-latest]
|
||||
|
||||
steps:
|
||||
- name: Setup
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: In ${{ matrix.os }} Execute the script validation code
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: ${{ matrix.go_version }}
|
||||
id: go
|
||||
|
||||
- name: scripts validation
|
||||
run: |
|
||||
sudo make verify
|
||||
continue-on-error: true
|
||||
|
||||
- name: verify format
|
||||
run: |
|
||||
sudo make format
|
||||
|
||||
- name: verify license
|
||||
run: |
|
||||
sudo make verify-copyright
|
||||
@@ -0,0 +1,48 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time.
|
||||
#
|
||||
# You can adjust the behavior by modifying this file.
|
||||
# For more information, see:
|
||||
# https://github.com/actions/stale
|
||||
name: Mark stale issues and pull requests
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 8 * * *'
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
|
||||
steps:
|
||||
- uses: actions/stale@v8
|
||||
with:
|
||||
repo-token: ${{ secrets.BOT_GITHUB_TOKEN }}
|
||||
days-before-stale: 60
|
||||
days-before-close: 7
|
||||
stale-issue-message: 'This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.'
|
||||
stale-pr-message: 'This issue is stale because it has been open 60 days with no activity.'
|
||||
close-issue-message: 'This issue was closed because it has been stalled for 7 days with no activity.'
|
||||
close-pr-message: 'This PR was closed because it has been stalled for 7 days with no activity. You can reopen it if you want.'
|
||||
stale-pr-label: lifecycle/stale
|
||||
stale-issue-label: lifecycle/stale
|
||||
exempt-issue-labels: 'openim'
|
||||
exempt-pr-labels: 'openim'
|
||||
exempt-draft-pr: true
|
||||
@@ -0,0 +1,43 @@
|
||||
# Copyright © 2023 KubeCub open source community. All rights reserved.
|
||||
# Licensed under the MIT License (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
|
||||
# https://github.com/BetaHuhn/repo-file-sync-action
|
||||
name: Synchronize kubecub public code to other repositories
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- scripts/*
|
||||
- docs/*
|
||||
- config/*
|
||||
branches:
|
||||
- release-v*.*
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
sync:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Run GitHub File Sync
|
||||
uses: BetaHuhn/repo-file-sync-action@latest
|
||||
with:
|
||||
GH_INSTALLATION_TOKEN: "${{ secrets.BOT_GITHUB_TOKEN }}"
|
||||
CONFIG_PATH: .github/sync-release.yml
|
||||
ORIGINAL_MESSAGE: true
|
||||
SKIP_PR: true
|
||||
COMMIT_EACH_FILE: false
|
||||
COMMIT_BODY: "🤖 kubbot to synchronize the warehouse"
|
||||
GIT_EMAIL: "3293172751ysy@gmail.com"
|
||||
GIT_USERNAME: "kubbot"
|
||||
PR_BODY: 👌 kubecub provides automated community services
|
||||
REVIEWERS: |
|
||||
kubbot
|
||||
cubxxw
|
||||
PR_LABELS: |
|
||||
file-sync
|
||||
automerge
|
||||
ASSIGNEES: |
|
||||
kubbot
|
||||
@@ -0,0 +1,39 @@
|
||||
# Copyright © 2023 KubeCub open source community. All rights reserved.
|
||||
# Licensed under the MIT License (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
|
||||
# https://github.com/BetaHuhn/repo-file-sync-action
|
||||
name: Synchronize kubecub public code to other repositories
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
sync:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Run GitHub File Sync
|
||||
uses: BetaHuhn/repo-file-sync-action@latest
|
||||
with:
|
||||
GH_INSTALLATION_TOKEN: "${{ secrets.BOT_GITHUB_TOKEN }}"
|
||||
CONFIG_PATH: .github/sync.yml
|
||||
ORIGINAL_MESSAGE: true
|
||||
SKIP_PR: true
|
||||
COMMIT_EACH_FILE: false
|
||||
COMMIT_BODY: "🤖 kubbot to synchronize the warehouse"
|
||||
GIT_EMAIL: "3293172751ysy@gmail.com"
|
||||
GIT_USERNAME: "kubbot"
|
||||
PR_BODY: 👌 kubecub provides automated community services
|
||||
REVIEWERS: |
|
||||
kubbot
|
||||
cubxxw
|
||||
PR_LABELS: |
|
||||
file-sync
|
||||
automerge
|
||||
ASSIGNEES: |
|
||||
kubbot
|
||||
+18
-5
@@ -29,15 +29,26 @@ tmp/
|
||||
bin/
|
||||
output/
|
||||
_output/
|
||||
deployments/charts/generated-configs/
|
||||
|
||||
### OpenIM Config ###
|
||||
.env
|
||||
config/config.yaml
|
||||
config/notification.yaml
|
||||
./config/config.yaml
|
||||
.env
|
||||
./.env
|
||||
|
||||
### OpenIM deploy ###
|
||||
deployments/openim-server/charts
|
||||
deploy/openim_demo
|
||||
deploy/openim-api
|
||||
deploy/openim-rpc-msg_gateway
|
||||
deploy/openim-msgtransfer
|
||||
deploy/openim-push
|
||||
deploy/openim_timer_task
|
||||
deploy/openim-rpc-user
|
||||
deploy/openim-rpc-friend
|
||||
deploy/openim-rpc-group
|
||||
deploy/openim-rpc-msg
|
||||
deploy/openim-rpc-auth
|
||||
deploy/Open-IM-SDK-Core
|
||||
|
||||
# files used by the developer
|
||||
.idea.md
|
||||
@@ -387,4 +398,6 @@ Sessionx.vim
|
||||
|
||||
# End of https://www.toptal.com/developers/gitignore/api/go,git,vim,tags,test,emacs,backup,jetbrains
|
||||
.idea
|
||||
dist/
|
||||
dist/
|
||||
.env
|
||||
config/config.yaml
|
||||
|
||||
+186
-180
@@ -1,3 +1,20 @@
|
||||
# Copyright © 2023 OpenIMSDK open source community. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# This file contains all available configuration options
|
||||
# with their default values.
|
||||
|
||||
# options for analysis running
|
||||
run:
|
||||
# default concurrency is a available CPU number
|
||||
@@ -22,19 +39,15 @@ run:
|
||||
# from this option's value (see skip-dirs-use-default).
|
||||
# "/" will be replaced by current OS file path separator to properly work
|
||||
# on Windows.
|
||||
# skip-dirs:
|
||||
# - components
|
||||
# - docs
|
||||
# - util
|
||||
# - .*~
|
||||
# - api/swagger/docs
|
||||
# - server/docs
|
||||
# - components/mnt/config/certs
|
||||
# - logs
|
||||
skip-dirs:
|
||||
- util
|
||||
- .*~
|
||||
- api/swagger/docs
|
||||
- server/docs
|
||||
|
||||
# default is true. Enables skipping of directories:
|
||||
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
|
||||
# skip-dirs-use-default: true
|
||||
skip-dirs-use-default: true
|
||||
|
||||
# which files to skip: they will be analyzed, but issues from them
|
||||
# won't be reported. Default value is empty list, but there is
|
||||
@@ -42,15 +55,9 @@ run:
|
||||
# autogenerated files. If it's not please let us know.
|
||||
# "/" will be replaced by current OS file path separator to properly work
|
||||
# on Windows.
|
||||
# skip-files:
|
||||
# - ".*\\.my\\.go$"
|
||||
# - _test.go
|
||||
# - ".*_test.go"
|
||||
# - "mocks/"
|
||||
# - ".github/"
|
||||
# - "logs/"
|
||||
# - "_output/"
|
||||
# - "components/"
|
||||
skip-files:
|
||||
- ".*\\.my\\.go$"
|
||||
- _test.go
|
||||
|
||||
# by default isn't set. If set we pass it to "go list -mod={option}". From "go help modules":
|
||||
# If invoked with -mod=readonly, the go command is disallowed from the implicit
|
||||
@@ -70,7 +77,7 @@ run:
|
||||
# output configuration options
|
||||
output:
|
||||
# colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number"
|
||||
# format: colored-line-number
|
||||
format: colored-line-number
|
||||
|
||||
# print lines of code with issue, default is true
|
||||
print-issued-lines: true
|
||||
@@ -101,7 +108,9 @@ linters-settings:
|
||||
right-to-left-isolate: true
|
||||
first-strong-isolate: true
|
||||
pop-directional-isolate: true
|
||||
|
||||
dogsled:
|
||||
# checks assignments with too many blank identifiers; default is 2
|
||||
max-blank-identifiers: 2
|
||||
dupl:
|
||||
# tokens count to trigger issue, 150 by default
|
||||
threshold: 200
|
||||
@@ -122,8 +131,8 @@ linters-settings:
|
||||
|
||||
# path to a file containing a list of functions to exclude from checking
|
||||
# see https://github.com/kisielk/errcheck#excluding-functions for details
|
||||
# exclude: errcheck.txt
|
||||
|
||||
#exclude: errcheck.txt
|
||||
|
||||
errorlint:
|
||||
# Check whether fmt.Errorf uses the %w verb for formatting errors. See the readme for caveats
|
||||
errorf: true
|
||||
@@ -133,11 +142,6 @@ linters-settings:
|
||||
comparison: true
|
||||
|
||||
exhaustive:
|
||||
# Program elements to check for exhaustiveness.
|
||||
# Default: [ switch ]
|
||||
check:
|
||||
- switch
|
||||
- map
|
||||
# check switch statements in generated files also
|
||||
check-generated: false
|
||||
# indicates that switch statements are to be considered exhaustive if a
|
||||
@@ -149,34 +153,33 @@ linters-settings:
|
||||
ignore-enum-members: ""
|
||||
# consider enums only in package scopes, not in inner scopes
|
||||
package-scope-only: false
|
||||
exhaustivestruct:
|
||||
struct-patterns:
|
||||
- '*.Test'
|
||||
- '*.Test2'
|
||||
- '*.Embedded'
|
||||
- '*.External'
|
||||
|
||||
|
||||
forbidigo:
|
||||
# forbidigo:
|
||||
# # Forbid the following identifiers (identifiers are written using regexp):
|
||||
forbid:
|
||||
# - ^print.*$
|
||||
- 'fmt\.Print.*'
|
||||
- fmt.Println.* # too much log noise
|
||||
- ^unsafe\..*$
|
||||
- ^init$
|
||||
- ^os.Exit$
|
||||
- ^fmt.Print.*$
|
||||
- errors.New.*$
|
||||
- ^fmt.Println.*$
|
||||
- ^panic$
|
||||
- painc
|
||||
# forbid:
|
||||
# - ^print.*$
|
||||
# - 'fmt\.Print.*'
|
||||
# - fmt.Println.* # too much log noise
|
||||
# - ginkgo\\.F.* # these are used just for local development
|
||||
# # Exclude godoc examples from forbidigo checks. Default is true.
|
||||
# exclude_godoc_examples: false
|
||||
|
||||
funlen:
|
||||
lines: 220
|
||||
statements: 80
|
||||
|
||||
lines: 150
|
||||
statements: 50
|
||||
gci:
|
||||
# put imports beginning with prefix after 3rd-party packages;
|
||||
# only support one prefix
|
||||
# if not set, use goimports.local-prefixes
|
||||
prefix: github.com/OpenIMSDK/Open-IM-Server
|
||||
gocognit:
|
||||
# minimal code complexity to report, 30 by default (but we recommend 10-20)
|
||||
min-complexity: 30
|
||||
|
||||
goconst:
|
||||
# minimal length of string constant, 3 by default
|
||||
min-len: 3
|
||||
@@ -202,6 +205,9 @@ linters-settings:
|
||||
# By default list of stable checks is used.
|
||||
enabled-checks:
|
||||
#- rangeValCopy
|
||||
- nestingreduce
|
||||
- truncatecmp
|
||||
- unnamedresult
|
||||
- ruleguard
|
||||
|
||||
# Which checks should be disabled; can't be combined with 'enabled-checks'; default is empty
|
||||
@@ -230,6 +236,9 @@ linters-settings:
|
||||
hugeParam:
|
||||
# size in bytes that makes the warning trigger (default 80)
|
||||
sizeThreshold: 80
|
||||
nestingReduce:
|
||||
# min number of statements inside a branch to trigger a warning (default 5)
|
||||
bodyWidth: 5
|
||||
rangeExprCopy:
|
||||
# size in bytes that makes the warning trigger (default 512)
|
||||
sizeThreshold: 512
|
||||
@@ -243,10 +252,15 @@ linters-settings:
|
||||
ruleguard:
|
||||
# path to a gorules file for the ruleguard checker
|
||||
rules: ''
|
||||
truncateCmp:
|
||||
# whether to skip int/uint/uintptr types (default true)
|
||||
skipArchDependent: true
|
||||
underef:
|
||||
# whether to skip (*x).method() calls where x is a pointer receiver (default true)
|
||||
skipRecvDeref: true
|
||||
|
||||
unnamedResult:
|
||||
# whether to check exported functions
|
||||
checkExported: true
|
||||
gocyclo:
|
||||
# minimal code complexity to report, 30 by default (but we recommend 10-20)
|
||||
min-complexity: 30
|
||||
@@ -263,12 +277,9 @@ linters-settings:
|
||||
# list of regexps for excluding particular comment lines from check
|
||||
exclude:
|
||||
# example: exclude comments which contain numbers
|
||||
- '[0-9]+'
|
||||
- 'func\s+\w+'
|
||||
- 'FIXME:'
|
||||
- '.*func.*'
|
||||
# - '[0-9]+'
|
||||
# check that each sentence starts with a capital letter
|
||||
capital: true
|
||||
capital: false
|
||||
godox:
|
||||
# report any comments starting with keywords, this is useful for TODO or FIXME comments that
|
||||
# might be left in the code accidentally and should be resolved before merging
|
||||
@@ -285,21 +296,21 @@ linters-settings:
|
||||
|
||||
gofumpt:
|
||||
# Select the Go version to target. The default is `1.18`.
|
||||
go-version: "1.21"
|
||||
lang-version: "1.20"
|
||||
|
||||
# Choose whether or not to use the extra rules that are disabled
|
||||
# by default
|
||||
extra-rules: false
|
||||
|
||||
# goheader:
|
||||
# values:
|
||||
# const:
|
||||
goheader:
|
||||
values:
|
||||
const:
|
||||
# define here const type values in format k:v, for example:
|
||||
# COMPANY: MY COMPANY
|
||||
# regexp:
|
||||
regexp:
|
||||
# define here regexp type values, for example
|
||||
# AUTHOR: .*@mycompany\.com
|
||||
# template: # |-
|
||||
template: # |-
|
||||
# put here copyright header template for source code files, for example:
|
||||
# Note: {{ YEAR }} is a builtin value that returns the year relative to the current machine time.
|
||||
#
|
||||
@@ -317,45 +328,21 @@ linters-settings:
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
# template-path:
|
||||
template-path:
|
||||
# also as alternative of directive 'template' you may put the path to file with the template source
|
||||
|
||||
goimports:
|
||||
# put imports beginning with prefix after 3rd-party packages;
|
||||
# it's a comma-separated list of prefixes
|
||||
local-prefixes: github.com/openimsdk/open-im-server
|
||||
local-prefixes: github.com/OpenIMSDK/Open-IM-Server
|
||||
|
||||
gomnd:
|
||||
# List of enabled checks, see https://github.com/tommy-muehle/go-mnd/#checks for description.
|
||||
# Default: ["argument", "case", "condition", "operation", "return", "assign"]
|
||||
checks:
|
||||
- argument
|
||||
- case
|
||||
- condition
|
||||
- operation
|
||||
- return
|
||||
- assign
|
||||
# List of numbers to exclude from analysis.
|
||||
# The numbers should be written as string.
|
||||
# Values always ignored: "1", "1.0", "0" and "0.0"
|
||||
# Default: []
|
||||
ignored-numbers:
|
||||
- '0666'
|
||||
- '0755'
|
||||
- '42'
|
||||
# List of file patterns to exclude from analysis.
|
||||
# Values always ignored: `.+_test.go`
|
||||
# Default: []
|
||||
ignored-files:
|
||||
- 'magic1_.+\.go$'
|
||||
# List of function patterns to exclude from analysis.
|
||||
# Following functions are always ignored: `time.Date`,
|
||||
# `strconv.FormatInt`, `strconv.FormatUint`, `strconv.FormatFloat`,
|
||||
# `strconv.ParseInt`, `strconv.ParseUint`, `strconv.ParseFloat`.
|
||||
# Default: []
|
||||
ignored-functions:
|
||||
- '^math\.'
|
||||
- '^webhook\.StatusText$'
|
||||
settings:
|
||||
mnd:
|
||||
# the list of enabled checks, see https://github.com/tommy-muehle/go-mnd/#checks for description.
|
||||
checks: argument,case,condition,operation,return,assign
|
||||
# ignored-numbers: 1000
|
||||
# ignored-files: magic_.*.go
|
||||
# ignored-functions: math.*
|
||||
gomoddirectives:
|
||||
# Allow local `replace` directives. Default is false.
|
||||
replace-local: true
|
||||
@@ -367,7 +354,6 @@ linters-settings:
|
||||
retract-allow-no-explanation: false
|
||||
# Forbid the use of the `exclude` directives. Default is false.
|
||||
exclude-forbidden: false
|
||||
|
||||
gomodguard:
|
||||
allowed:
|
||||
modules:
|
||||
@@ -375,17 +361,13 @@ linters-settings:
|
||||
- gorm.io/gorm
|
||||
- gorm.io/driver/mysql
|
||||
- k8s.io/klog
|
||||
- github.com/allowed/module
|
||||
- go.mongodb.org/mongo-driver/mongo
|
||||
# - gopkg.in/yaml.v2
|
||||
domains: # List of allowed module domains
|
||||
- google.golang.org
|
||||
- gopkg.in
|
||||
- golang.org
|
||||
- github.com
|
||||
- go.mongodb.org
|
||||
- go.uber.org
|
||||
- openim.io
|
||||
- go.etcd.io
|
||||
blocked:
|
||||
versions:
|
||||
@@ -431,6 +413,9 @@ linters-settings:
|
||||
checks: [ "all" ]
|
||||
|
||||
govet:
|
||||
# report about shadowed variables
|
||||
check-shadowing: true
|
||||
|
||||
# settings per analyzer
|
||||
settings:
|
||||
printf: # analyzer name, run `go tool vet help` to see all analyzers
|
||||
@@ -447,25 +432,15 @@ linters-settings:
|
||||
disable:
|
||||
- shadow
|
||||
disable-all: false
|
||||
# depguard:
|
||||
# list-type: blacklist
|
||||
# include-go-root: false
|
||||
# packages:
|
||||
# - github.com/Sirupsen/logrus
|
||||
# packages-with-error-message:
|
||||
# # specify an error message to output when a blacklisted package is used
|
||||
# - github.com/Sirupsen/logrus: "logging is allowed only by logutils.Log"
|
||||
|
||||
depguard:
|
||||
rules:
|
||||
prevent_unmaintained_packages:
|
||||
list-mode: lax # allow unless explicitely denied
|
||||
files:
|
||||
- $all
|
||||
- "!$test"
|
||||
allow:
|
||||
- $gostd
|
||||
deny:
|
||||
- pkg: io/ioutil
|
||||
desc: "replaced by io and os packages since Go 1.16: https://tip.golang.org/doc/go1.16#ioutil"
|
||||
- pkg: github.com/OpenIMSDK
|
||||
desc: "The OpenIM organization has been replaced with lowercase, please do not use uppercase organization name, you will use openimsdk"
|
||||
- pkg: log
|
||||
desc: "We have a wrapped log package at openim, we recommend you to use our wrapped log package, https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/logging.md"
|
||||
- pkg: errors
|
||||
desc: "We have a wrapped errors package at openim, we recommend you to use our wrapped errors package, https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/error-code.md"
|
||||
|
||||
importas:
|
||||
# if set to `true`, force to use alias.
|
||||
@@ -475,8 +450,6 @@ linters-settings:
|
||||
# using `servingv1` alias for `knative.dev/serving/pkg/apis/serving/v1` package
|
||||
- pkg: knative.dev/serving/pkg/apis/serving/v1
|
||||
alias: servingv1
|
||||
- pkg: gopkg.in/yaml.v2
|
||||
alias: yaml
|
||||
# using `autoscalingv1alpha1` alias for `knative.dev/serving/pkg/apis/autoscaling/v1alpha1` package
|
||||
- pkg: knative.dev/serving/pkg/apis/autoscaling/v1alpha1
|
||||
alias: autoscalingv1alpha1
|
||||
@@ -485,6 +458,8 @@ linters-settings:
|
||||
# see https://github.com/julz/importas#use-regular-expression for details
|
||||
- pkg: knative.dev/serving/pkg/apis/(\w+)/(v[\w\d]+)
|
||||
alias: $1$2
|
||||
# using `jwt` alias for `github.com/appleboy/gin-jwt/v2` package
|
||||
jwt: github.com/appleboy/gin-jwt/v2
|
||||
|
||||
ireturn:
|
||||
# ireturn allows using `allow` and `reject` settings at the same time.
|
||||
@@ -510,11 +485,14 @@ linters-settings:
|
||||
- github.com\/user\/package\/v4\.Type
|
||||
|
||||
lll:
|
||||
# max line length, lines longer will be reported. Default is 250.
|
||||
# max line length, lines longer will be reported. Default is 120.
|
||||
# '\t' is counted as 1 character by default, and can be changed with the tab-width option
|
||||
line-length: 250
|
||||
line-length: 240
|
||||
# tab width in spaces. Default to 1.
|
||||
tab-width: 4
|
||||
maligned:
|
||||
# print struct with more effective memory layout or not, false by default
|
||||
suggest-new: true
|
||||
misspell:
|
||||
# Correct spellings using locale preferences for US or UK.
|
||||
# Default is to use a neutral variety of English.
|
||||
@@ -547,6 +525,8 @@ linters-settings:
|
||||
nolintlint:
|
||||
# Disable to ensure that all nolint directives actually have an effect. Default is true.
|
||||
allow-unused: false
|
||||
# Disable to ensure that nolint directives don't have a leading space. Default is true.
|
||||
allow-leading-space: true
|
||||
# Exclude following linters from requiring an explanation. Default is [].
|
||||
allow-no-explanation: [ ]
|
||||
# Enable to require an explanation of nonzero length after each nolint directive. Default is false.
|
||||
@@ -570,13 +550,14 @@ linters-settings:
|
||||
strict: false
|
||||
# Please refer to https://github.com/yeya24/promlinter#usage for detailed usage.
|
||||
disabled-linters:
|
||||
- "Help"
|
||||
- "MetricUnits"
|
||||
- "Counter"
|
||||
- "HistogramSummaryReserved"
|
||||
- "MetricTypeInName"
|
||||
- "ReservedChars"
|
||||
- "CamelCase"
|
||||
# - "Help"
|
||||
# - "MetricUnits"
|
||||
# - "Counter"
|
||||
# - "HistogramSummaryReserved"
|
||||
# - "MetricTypeInName"
|
||||
# - "ReservedChars"
|
||||
# - "CamelCase"
|
||||
# - "lintUnitAbbreviations"
|
||||
|
||||
predeclared:
|
||||
# comma-separated list of predeclared identifiers to not report on
|
||||
@@ -586,7 +567,6 @@ linters-settings:
|
||||
rowserrcheck:
|
||||
packages:
|
||||
- github.com/jmoiron/sqlx
|
||||
|
||||
revive:
|
||||
# see https://github.com/mgechev/revive#available-rules for details.
|
||||
ignore-generated-header: true
|
||||
@@ -594,27 +574,15 @@ linters-settings:
|
||||
rules:
|
||||
- name: indent-error-flow
|
||||
severity: warning
|
||||
- name: exported
|
||||
severity: warning
|
||||
- name: var-naming
|
||||
arguments: [ [ "OpenIM"] ]
|
||||
# arguments: [ ["ID", "HTTP", "URL", "URI", "API", "APIKey", "Token", "TokenID", "TokenSecret", "TokenKey", "TokenSecret", "JWT", "JWTToken", "JWTTokenID", "JWTTokenSecret", "JWTTokenKey", "JWTTokenSecret", "OAuth", "OAuthToken", "RPC" ] ]
|
||||
- name: atomic
|
||||
- name: line-length-limit
|
||||
severity: error
|
||||
arguments: [200]
|
||||
- name: unhandled-error
|
||||
arguments : ["fmt.Printf", "myFunction"]
|
||||
|
||||
staticcheck:
|
||||
# Select the Go version to target. The default is '1.13'.
|
||||
go: "1.20"
|
||||
go: "1.16"
|
||||
# https://staticcheck.io/docs/options#checks
|
||||
checks: [ "all" ]
|
||||
|
||||
stylecheck:
|
||||
# Select the Go version to target. The default is '1.13'.
|
||||
go: "1.20"
|
||||
go: "1.16"
|
||||
|
||||
# https://staticcheck.io/docs/options#checks
|
||||
checks: [ "all", "-ST1000", "-ST1003", "-ST1016", "-ST1020", "-ST1021", "-ST1022" ]
|
||||
@@ -626,6 +594,7 @@ linters-settings:
|
||||
# https://staticcheck.io/docs/options#http_status_code_whitelist
|
||||
http-status-code-whitelist: [ "200", "400", "404", "500" ]
|
||||
|
||||
|
||||
tagliatelle:
|
||||
# check the struck tag name case
|
||||
case:
|
||||
@@ -671,11 +640,12 @@ linters-settings:
|
||||
# if it's called for subdir of a project it can't find external interfaces. All text editor integrations
|
||||
# with golangci-lint call it on a directory with the changed file.
|
||||
check-exported: false
|
||||
# unused:
|
||||
unused:
|
||||
# treat code as a program (not a library) and report unused exported identifiers; default is false.
|
||||
# XXX: if you enable this setting, unused will report a lot of false-positives in text editors:
|
||||
# if it's called for subdir of a project it can't find funcs usages. All text editor integrations
|
||||
# with golangci-lint call it on a directory with the changed file.
|
||||
check-exported: false
|
||||
whitespace:
|
||||
multi-if: false # Enforces newlines (or comments) after every multi-line if statement
|
||||
multi-func: false # Enforces newlines (or comments) after every multi-line function signature
|
||||
@@ -689,7 +659,6 @@ linters-settings:
|
||||
- errors.New(
|
||||
- errors.Unwrap(
|
||||
- .Wrap(
|
||||
- .WrapMsg(
|
||||
- .Wrapf(
|
||||
- .WithMessage(
|
||||
- .WithMessagef(
|
||||
@@ -697,8 +666,6 @@ linters-settings:
|
||||
ignorePackageGlobs:
|
||||
- encoding/*
|
||||
- github.com/pkg/*
|
||||
- github.com/openimsdk/*
|
||||
- github.com/OpenIMSDK/*
|
||||
|
||||
wsl:
|
||||
# If true append is only allowed to be cuddled if appending value is
|
||||
@@ -725,6 +692,7 @@ linters-settings:
|
||||
# Allow only slices initialized with a length of zero. Default is false.
|
||||
always: false
|
||||
|
||||
|
||||
# The custom section can be used to define linter plugins to be loaded at runtime. See README doc
|
||||
# for more info.
|
||||
#custom:
|
||||
@@ -743,39 +711,83 @@ linters:
|
||||
# enable-all: true
|
||||
disable-all: true
|
||||
enable:
|
||||
- typecheck # Basic type checking
|
||||
- gofmt # Format check
|
||||
- govet # Go's standard linting tool
|
||||
- gosimple # Suggestions for simplifying code
|
||||
- typecheck
|
||||
- asciicheck
|
||||
- bodyclose
|
||||
- cyclop
|
||||
# - depguard
|
||||
- dogsled
|
||||
- dupl
|
||||
- durationcheck
|
||||
- errcheck
|
||||
- decorder
|
||||
- errorlint
|
||||
- exhaustive
|
||||
- exportloopref
|
||||
# - forbidigo
|
||||
- funlen
|
||||
# - gci
|
||||
# - gochecknoinits
|
||||
- gocognit
|
||||
- goconst
|
||||
- gocyclo
|
||||
- godot
|
||||
- godox
|
||||
- gofmt
|
||||
- gofumpt
|
||||
- goheader
|
||||
- goimports
|
||||
- gomoddirectives
|
||||
- gomodguard
|
||||
- goprintffuncname
|
||||
- gosec
|
||||
- gosimple
|
||||
- govet
|
||||
- importas
|
||||
- ineffassign
|
||||
- forbidigo
|
||||
- lll
|
||||
- makezero
|
||||
- misspell
|
||||
- nakedret
|
||||
- nestif
|
||||
- nilerr
|
||||
- nlreturn
|
||||
- noctx
|
||||
- nolintlint
|
||||
- paralleltest
|
||||
- prealloc
|
||||
- predeclared
|
||||
- promlinter
|
||||
- revive
|
||||
- reassign
|
||||
- rowserrcheck
|
||||
- sqlclosecheck
|
||||
- staticcheck
|
||||
- stylecheck
|
||||
- thelper
|
||||
- tparallel
|
||||
- unconvert
|
||||
- fieldalignment
|
||||
- dupl
|
||||
- dupword
|
||||
- errname
|
||||
- gci
|
||||
- exhaustive
|
||||
- gocritic
|
||||
- goprintffuncname
|
||||
- gomnd
|
||||
- goconst
|
||||
- gosec
|
||||
- misspell # Spelling mistakes
|
||||
- staticcheck # Static analysis
|
||||
- unused # Checks for unused code
|
||||
# - goimports # Checks if imports are correctly sorted and formatted
|
||||
- godot # Checks for comment punctuation
|
||||
- bodyclose # Ensures HTTP response body is closed
|
||||
- stylecheck # Style checker for Go code
|
||||
- unused # Checks for unused code
|
||||
- errcheck # Checks for missed error returns
|
||||
fast: true
|
||||
- unparam
|
||||
- unused
|
||||
- wastedassign
|
||||
- whitespace
|
||||
- bidichk
|
||||
- wastedassign
|
||||
- execinquery
|
||||
- nosprintfhostport
|
||||
- grouper
|
||||
- decorder
|
||||
- errchkjson
|
||||
- maintidx
|
||||
#- containedctx
|
||||
#- tagliatelle
|
||||
#- nonamedreturns
|
||||
#- nilnil
|
||||
#- tenv
|
||||
#- varnamelen
|
||||
#- contextcheck
|
||||
#- errname
|
||||
#- ForceTypeAssert
|
||||
#- nilassign
|
||||
fast: false
|
||||
|
||||
issues:
|
||||
# List of regexps of issue texts to exclude, empty list by default.
|
||||
@@ -785,7 +797,6 @@ issues:
|
||||
exclude:
|
||||
- tools/.*
|
||||
- test/.*
|
||||
- components/*
|
||||
- third_party/.*
|
||||
|
||||
# Excluding configuration per-path, per-linter, per-text and per-source
|
||||
@@ -842,11 +853,6 @@ issues:
|
||||
- lll
|
||||
source: "^//go:generate "
|
||||
|
||||
- text: ".*[\u4e00-\u9fa5]+.*"
|
||||
linters:
|
||||
- golint
|
||||
source: "^//.*$"
|
||||
|
||||
# Independently from option `exclude` we use default exclude patterns,
|
||||
# it can be disabled by this option. To list all
|
||||
# excluded by default patterns execute `golangci-lint run --help`.
|
||||
@@ -907,4 +913,4 @@ severity:
|
||||
rules:
|
||||
- linters:
|
||||
- dupl
|
||||
severity: info
|
||||
severity: info
|
||||
@@ -3,7 +3,7 @@ style: github
|
||||
template: CHANGELOG.tpl.md
|
||||
info:
|
||||
title: CHANGELOG
|
||||
repository_url: https://github.com/openimsdk/open-im-server
|
||||
repository_url: https://github.com/OpenIMSDK/Open-IM-Server
|
||||
options:
|
||||
tag_filter_pattern: '^v'
|
||||
sort: "date"
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
# Version logging for OpenIM
|
||||
|
||||
> **Note**:
|
||||
> Deprecated version logging for OpenIM, please refer to [CHANGELOG.md](../CHANGELOG.md)
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_TOC -->
|
||||
|
||||
- [Version logging for OpenIM](#version-logging-for-openim)
|
||||
- [Unreleased](#unreleased)
|
||||
- [v1.0.7 - 2021-12-17](#v107---2021-12-17)
|
||||
- [v1.0.6 - 2021-12-10](#v106---2021-12-10)
|
||||
- [v1.0.5 - 2021-12-03](#v105---2021-12-03)
|
||||
- [v1.0.4 - 2021-11-25](#v104---2021-11-25)
|
||||
- [v1.0.3 - 2021-11-12](#v103---2021-11-12)
|
||||
- [v1.0.1 - 2021-11-04](#v101---2021-11-04)
|
||||
- [v1.0.0 - 2021-10-28](#v100---2021-10-28)
|
||||
- [Reverts](#reverts)
|
||||
|
||||
<!-- END MUNGE: GENERATED_TOC -->
|
||||
|
||||
<a name="unreleased"></a>
|
||||
## [Unreleased]
|
||||
|
||||
|
||||
<a name="v1.0.7"></a>
|
||||
## [v1.0.7] - 2021-12-17
|
||||
|
||||
<a name="v1.0.6"></a>
|
||||
## [v1.0.6] - 2021-12-10
|
||||
|
||||
<a name="v1.0.5"></a>
|
||||
## [v1.0.5] - 2021-12-03
|
||||
|
||||
<a name="v1.0.4"></a>
|
||||
## [v1.0.4] - 2021-11-25
|
||||
|
||||
<a name="v1.0.3"></a>
|
||||
## [v1.0.3] - 2021-11-12
|
||||
|
||||
<a name="v1.0.1"></a>
|
||||
## [v1.0.1] - 2021-11-04
|
||||
|
||||
<a name="v1.0.0"></a>
|
||||
## v1.0.0 - 2021-10-28
|
||||
### Reverts
|
||||
- friend modify
|
||||
- update
|
||||
|
||||
|
||||
[Unreleased]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v1.0.7...HEAD
|
||||
[v1.0.7]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v1.0.6...v1.0.7
|
||||
[v1.0.6]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v1.0.5...v1.0.6
|
||||
[v1.0.5]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v1.0.4...v1.0.5
|
||||
[v1.0.4]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v1.0.3...v1.0.4
|
||||
[v1.0.3]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v1.0.1...v1.0.3
|
||||
[v1.0.1]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v1.0.0...v1.0.1
|
||||
@@ -0,0 +1,87 @@
|
||||
# Version logging for OpenIM
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_TOC -->
|
||||
|
||||
<!-- END MUNGE: GENERATED_TOC -->
|
||||
|
||||
<a name="unreleased"></a>
|
||||
## [Unreleased]
|
||||
|
||||
|
||||
<a name="v2.0.10"></a>
|
||||
## [v2.0.10] - 2022-05-13
|
||||
|
||||
<a name="v2.0.9"></a>
|
||||
## [v2.0.9] - 2022-04-29
|
||||
### Reverts
|
||||
- update etcd to v3.5.2 ([#206](https://github.com/OpenIMSDK/Open-IM-Server/issues/206))
|
||||
|
||||
### Pull Requests
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
|
||||
|
||||
<a name="v2.0.8"></a>
|
||||
## [v2.0.8] - 2022-04-24
|
||||
### Pull Requests
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
|
||||
|
||||
<a name="v2.0.7"></a>
|
||||
## [v2.0.7] - 2022-04-08
|
||||
### Pull Requests
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
|
||||
|
||||
<a name="v2.0.6"></a>
|
||||
## [v2.0.6] - 2022-04-01
|
||||
### Pull Requests
|
||||
- Merge branch 'tuoyun'
|
||||
|
||||
|
||||
<a name="v2.0.5"></a>
|
||||
## [v2.0.5] - 2022-03-24
|
||||
|
||||
<a name="v2.04"></a>
|
||||
## [v2.04] - 2022-03-18
|
||||
|
||||
<a name="v2.0.3"></a>
|
||||
## [v2.0.3] - 2022-03-11
|
||||
|
||||
<a name="v2.0.2"></a>
|
||||
## [v2.0.2] - 2022-03-04
|
||||
### Pull Requests
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
|
||||
|
||||
<a name="v2.0.1"></a>
|
||||
## [v2.0.1] - 2022-02-25
|
||||
|
||||
<a name="v2.0.0"></a>
|
||||
## v2.0.0 - 2022-02-23
|
||||
### Reverts
|
||||
- friend modify
|
||||
- update
|
||||
|
||||
|
||||
[Unreleased]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.0.10...HEAD
|
||||
[v2.0.10]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.0.9...v2.0.10
|
||||
[v2.0.9]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.0.8...v2.0.9
|
||||
[v2.0.8]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.0.7...v2.0.8
|
||||
[v2.0.7]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.0.6...v2.0.7
|
||||
[v2.0.6]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.0.5...v2.0.6
|
||||
[v2.0.5]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.04...v2.0.5
|
||||
[v2.04]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.0.3...v2.04
|
||||
[v2.0.3]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.0.2...v2.0.3
|
||||
[v2.0.2]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.0.1...v2.0.2
|
||||
[v2.0.1]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.0.0...v2.0.1
|
||||
@@ -0,0 +1,50 @@
|
||||
# Version logging for OpenIM:v2.1
|
||||
|
||||
> **Note**:
|
||||
> Deprecated version logging for OpenIM, please refer to [CHANGELOG.md](../CHANGELOG.md)
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_TOC -->
|
||||
|
||||
- [Version logging for OpenIM:v2.1](#version-logging-for-openimv21)
|
||||
- [Unreleased](#unreleased)
|
||||
- [v2.1.0 - 2022-06-17](#v210---2022-06-17)
|
||||
- [Reverts](#reverts)
|
||||
- [Pull Requests](#pull-requests)
|
||||
|
||||
|
||||
<!-- END MUNGE: GENERATED_TOC -->
|
||||
|
||||
<a name="unreleased"></a>
|
||||
## [Unreleased]
|
||||
|
||||
|
||||
<a name="v2.1.0"></a>
|
||||
## v2.1.0 - 2022-06-17
|
||||
### Reverts
|
||||
- update etcd to v3.5.2 ([#206](https://github.com/OpenIMSDK/Open-IM-Server/issues/206))
|
||||
- friend modify
|
||||
- update
|
||||
|
||||
### Pull Requests
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
|
||||
|
||||
[Unreleased]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.1.0...HEAD
|
||||
@@ -0,0 +1,50 @@
|
||||
# Version logging for OpenIM:v2.2
|
||||
|
||||
> **Note**:
|
||||
> Deprecated version logging for OpenIM, please refer to [CHANGELOG.md](../CHANGELOG.md)
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_TOC -->
|
||||
|
||||
- [Version logging for OpenIM:v2.2](#version-logging-for-openimv22)
|
||||
- [Unreleased](#unreleased)
|
||||
- [v2.2.0 - 2022-07-01](#v220---2022-07-01)
|
||||
- [Reverts](#reverts)
|
||||
- [Pull Requests](#pull-requests)
|
||||
|
||||
|
||||
<!-- END MUNGE: GENERATED_TOC -->
|
||||
|
||||
<a name="unreleased"></a>
|
||||
## [Unreleased]
|
||||
|
||||
|
||||
<a name="v2.2.0"></a>
|
||||
## v2.2.0 - 2022-07-01
|
||||
### Reverts
|
||||
- update etcd to v3.5.2 ([#206](https://github.com/OpenIMSDK/Open-IM-Server/issues/206))
|
||||
- friend modify
|
||||
- update
|
||||
|
||||
### Pull Requests
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
|
||||
|
||||
[Unreleased]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.2.0...HEAD
|
||||
@@ -0,0 +1,70 @@
|
||||
# Version logging for OpenIM:v2.3
|
||||
|
||||
> **Note**:
|
||||
> Deprecated version logging for OpenIM, please refer to [CHANGELOG.md](../CHANGELOG.md)
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_TOC -->
|
||||
|
||||
- [Version logging for OpenIM:v2.3](#version-logging-for-openimv23)
|
||||
- [Unreleased](#unreleased)
|
||||
- [v2.3.3 - 2022-09-18](#v233---2022-09-18)
|
||||
- [v2.3.2 - 2022-09-09](#v232---2022-09-09)
|
||||
- [v2.3.0-rc2 - 2022-07-29](#v230-rc2---2022-07-29)
|
||||
- [v2.3.0-rc1 - 2022-07-25](#v230-rc1---2022-07-25)
|
||||
- [v2.3.0-rc0 - 2022-07-15](#v230-rc0---2022-07-15)
|
||||
- [Reverts](#reverts)
|
||||
- [Pull Requests](#pull-requests)
|
||||
|
||||
|
||||
<!-- END MUNGE: GENERATED_TOC -->
|
||||
|
||||
<a name="unreleased"></a>
|
||||
## [Unreleased]
|
||||
|
||||
|
||||
<a name="v2.3.3"></a>
|
||||
## [v2.3.3] - 2022-09-18
|
||||
|
||||
<a name="v2.3.2"></a>
|
||||
## [v2.3.2] - 2022-09-09
|
||||
|
||||
<a name="v2.3.0-rc2"></a>
|
||||
## [v2.3.0-rc2] - 2022-07-29
|
||||
|
||||
<a name="v2.3.0-rc1"></a>
|
||||
## [v2.3.0-rc1] - 2022-07-25
|
||||
|
||||
<a name="v2.3.0-rc0"></a>
|
||||
## v2.3.0-rc0 - 2022-07-15
|
||||
### Reverts
|
||||
- update etcd to v3.5.2 ([#206](https://github.com/OpenIMSDK/Open-IM-Server/issues/206))
|
||||
- friend modify
|
||||
- update
|
||||
|
||||
### Pull Requests
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
|
||||
|
||||
[Unreleased]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.3.3...HEAD
|
||||
[v2.3.3]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.3.2...v2.3.3
|
||||
[v2.3.2]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.3.0-rc2...v2.3.2
|
||||
[v2.3.0-rc2]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.3.0-rc1...v2.3.0-rc2
|
||||
[v2.3.0-rc1]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.3.0-rc0...v2.3.0-rc1
|
||||
@@ -0,0 +1,52 @@
|
||||
# Version logging for OpenIM
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_TOC -->
|
||||
|
||||
- [Version logging for OpenIM](#version-logging-for-openim)
|
||||
- [Unreleased](#unreleased)
|
||||
- [v2.9.0+1.839643f - 2023-07-07](#v2901839643f---2023-07-07)
|
||||
- [v2.9.0+2.35f07fe - 2023-07-06](#v290235f07fe---2023-07-06)
|
||||
- [v2.9.0+1.b5072b1 - 2023-07-05](#v2901b5072b1---2023-07-05)
|
||||
- [v2.9.0+3.2667a3a - 2023-07-05](#v29032667a3a---2023-07-05)
|
||||
- [v2.9.0+7.04818ca - 2023-07-05](#v290704818ca---2023-07-05)
|
||||
- [v2.9.0 - 2023-07-04](#v290---2023-07-04)
|
||||
- [Reverts](#reverts)
|
||||
- [Pull Requests](#pull-requests)
|
||||
|
||||
|
||||
<!-- END MUNGE: GENERATED_TOC -->
|
||||
|
||||
<a name="unreleased"></a>
|
||||
## [Unreleased]
|
||||
|
||||
|
||||
<a name="v2.9.0+1.839643f"></a>
|
||||
## [v2.9.0+1.839643f] - 2023-07-07
|
||||
|
||||
<a name="v2.9.0+2.35f07fe"></a>
|
||||
## [v2.9.0+2.35f07fe] - 2023-07-06
|
||||
|
||||
<a name="v2.9.0+1.b5072b1"></a>
|
||||
## [v2.9.0+1.b5072b1] - 2023-07-05
|
||||
|
||||
<a name="v2.9.0+3.2667a3a"></a>
|
||||
## [v2.9.0+3.2667a3a] - 2023-07-05
|
||||
|
||||
<a name="v2.9.0+7.04818ca"></a>
|
||||
## [v2.9.0+7.04818ca] - 2023-07-05
|
||||
|
||||
<a name="v2.9.0"></a>
|
||||
## v2.9.0 - 2023-07-04
|
||||
### Reverts
|
||||
- update etcd to v3.5.2 ([#206](https://github.com/OpenIMSDK/Open-IM-Server/issues/206))
|
||||
|
||||
### Pull Requests
|
||||
- Merge branch 'tuoyun'
|
||||
|
||||
|
||||
[Unreleased]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.9.0+1.839643f...HEAD
|
||||
[v2.9.0+1.839643f]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.9.0+2.35f07fe...v2.9.0+1.839643f
|
||||
[v2.9.0+2.35f07fe]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.9.0+1.b5072b1...v2.9.0+2.35f07fe
|
||||
[v2.9.0+1.b5072b1]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.9.0+3.2667a3a...v2.9.0+1.b5072b1
|
||||
[v2.9.0+3.2667a3a]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.9.0+7.04818ca...v2.9.0+3.2667a3a
|
||||
[v2.9.0+7.04818ca]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.9.0...v2.9.0+7.04818ca
|
||||
@@ -0,0 +1,188 @@
|
||||
# Version logging for OpenIM
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_TOC -->
|
||||
- [Version logging for OpenIM](#version-logging-for-openim)
|
||||
- [Unreleased](#unreleased)
|
||||
- [v2.9.0 - 2023-07-04](#v290---2023-07-04)
|
||||
- [Reverts](#reverts)
|
||||
- [Pull Requests](#pull-requests)
|
||||
- [v2.3.3 - 2022-09-18](#v233---2022-09-18)
|
||||
- [v2.3.2 - 2022-09-09](#v232---2022-09-09)
|
||||
- [v2.3.0-rc2 - 2022-07-29](#v230-rc2---2022-07-29)
|
||||
- [v2.3.0-rc1 - 2022-07-25](#v230-rc1---2022-07-25)
|
||||
- [v2.3.0-rc0 - 2022-07-15](#v230-rc0---2022-07-15)
|
||||
- [v2.2.0 - 2022-07-01](#v220---2022-07-01)
|
||||
- [v2.1.0 - 2022-06-17](#v210---2022-06-17)
|
||||
- [Pull Requests](#pull-requests-1)
|
||||
- [v2.0.10 - 2022-05-13](#v2010---2022-05-13)
|
||||
- [v2.0.9 - 2022-04-29](#v209---2022-04-29)
|
||||
- [Reverts](#reverts-1)
|
||||
- [Pull Requests](#pull-requests-2)
|
||||
- [v2.0.7 - 2022-04-08](#v207---2022-04-08)
|
||||
- [Pull Requests](#pull-requests-3)
|
||||
- [v2.0.6 - 2022-04-01](#v206---2022-04-01)
|
||||
- [Pull Requests](#pull-requests-4)
|
||||
- [v2.0.5 - 2022-03-24](#v205---2022-03-24)
|
||||
- [v2.04 - 2022-03-18](#v204---2022-03-18)
|
||||
- [v2.0.3 - 2022-03-11](#v203---2022-03-11)
|
||||
- [v2.0.2 - 2022-03-04](#v202---2022-03-04)
|
||||
- [Pull Requests](#pull-requests-5)
|
||||
- [v2.0.1 - 2022-02-25](#v201---2022-02-25)
|
||||
- [v2.0.0 - 2022-02-23](#v200---2022-02-23)
|
||||
- [v1.0.7 - 2021-12-17](#v107---2021-12-17)
|
||||
- [v1.0.6 - 2021-12-10](#v106---2021-12-10)
|
||||
- [v1.0.5 - 2021-12-03](#v105---2021-12-03)
|
||||
- [v1.0.4 - 2021-11-25](#v104---2021-11-25)
|
||||
- [v1.0.3 - 2021-11-12](#v103---2021-11-12)
|
||||
- [v1.0.1 - 2021-11-04](#v101---2021-11-04)
|
||||
- [v1.0.0 - 2021-10-28](#v100---2021-10-28)
|
||||
- [Reverts](#reverts-2)
|
||||
|
||||
<!-- END MUNGE: GENERATED_TOC -->
|
||||
|
||||
<a name="unreleased"></a>
|
||||
## [Unreleased]
|
||||
|
||||
|
||||
<a name="v2.9.0"></a>
|
||||
## [v2.9.0] - 2023-07-04
|
||||
### Reverts
|
||||
- update etcd to v3.5.2 ([#206](https://github.com/OpenIMSDK/Open-IM-Server/issues/206))
|
||||
|
||||
### Pull Requests
|
||||
- Merge branch 'tuoyun'
|
||||
|
||||
|
||||
<a name="v2.3.3"></a>
|
||||
## [v2.3.3] - 2022-09-18
|
||||
|
||||
<a name="v2.3.2"></a>
|
||||
## [v2.3.2] - 2022-09-09
|
||||
|
||||
<a name="v2.3.0-rc2"></a>
|
||||
## [v2.3.0-rc2] - 2022-07-29
|
||||
|
||||
<a name="v2.3.0-rc1"></a>
|
||||
## [v2.3.0-rc1] - 2022-07-25
|
||||
|
||||
<a name="v2.3.0-rc0"></a>
|
||||
## [v2.3.0-rc0] - 2022-07-15
|
||||
|
||||
<a name="v2.2.0"></a>
|
||||
## [v2.2.0] - 2022-07-01
|
||||
|
||||
<a name="v2.1.0"></a>
|
||||
## [v2.1.0] - 2022-06-17
|
||||
### Pull Requests
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
|
||||
|
||||
<a name="v2.0.10"></a>
|
||||
## [v2.0.10] - 2022-05-13
|
||||
|
||||
<a name="v2.0.9"></a>
|
||||
## [v2.0.9] - 2022-04-29
|
||||
### Reverts
|
||||
- update etcd to v3.5.2 ([#206](https://github.com/OpenIMSDK/Open-IM-Server/issues/206))
|
||||
|
||||
### Pull Requests
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
|
||||
|
||||
<a name="v2.0.7"></a>
|
||||
## [v2.0.7] - 2022-04-08
|
||||
### Pull Requests
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
|
||||
|
||||
<a name="v2.0.6"></a>
|
||||
## [v2.0.6] - 2022-04-01
|
||||
### Pull Requests
|
||||
- Merge branch 'tuoyun'
|
||||
|
||||
|
||||
<a name="v2.0.5"></a>
|
||||
## [v2.0.5] - 2022-03-24
|
||||
|
||||
<a name="v2.04"></a>
|
||||
## [v2.04] - 2022-03-18
|
||||
|
||||
<a name="v2.0.3"></a>
|
||||
## [v2.0.3] - 2022-03-11
|
||||
|
||||
<a name="v2.0.2"></a>
|
||||
## [v2.0.2] - 2022-03-04
|
||||
### Pull Requests
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
|
||||
|
||||
<a name="v2.0.1"></a>
|
||||
## [v2.0.1] - 2022-02-25
|
||||
|
||||
<a name="v2.0.0"></a>
|
||||
## [v2.0.0] - 2022-02-23
|
||||
|
||||
<a name="v1.0.7"></a>
|
||||
## [v1.0.7] - 2021-12-17
|
||||
|
||||
<a name="v1.0.6"></a>
|
||||
## [v1.0.6] - 2021-12-10
|
||||
|
||||
<a name="v1.0.5"></a>
|
||||
## [v1.0.5] - 2021-12-03
|
||||
|
||||
<a name="v1.0.4"></a>
|
||||
## [v1.0.4] - 2021-11-25
|
||||
|
||||
<a name="v1.0.3"></a>
|
||||
## [v1.0.3] - 2021-11-12
|
||||
|
||||
<a name="v1.0.1"></a>
|
||||
## [v1.0.1] - 2021-11-04
|
||||
|
||||
<a name="v1.0.0"></a>
|
||||
## v1.0.0 - 2021-10-28
|
||||
### Reverts
|
||||
- friend modify
|
||||
- update
|
||||
|
||||
|
||||
[Unreleased]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.9.0...HEAD
|
||||
[v2.9.0]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.3.3...v2.9.0
|
||||
[v2.3.3]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.3.2...v2.3.3
|
||||
[v2.3.2]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.3.0-rc2...v2.3.2
|
||||
[v2.3.0-rc2]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.3.0-rc1...v2.3.0-rc2
|
||||
[v2.3.0-rc1]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.3.0-rc0...v2.3.0-rc1
|
||||
[v2.3.0-rc0]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.2.0...v2.3.0-rc0
|
||||
[v2.2.0]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.1.0...v2.2.0
|
||||
[v2.1.0]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.0.10...v2.1.0
|
||||
[v2.0.10]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.0.9...v2.0.10
|
||||
[v2.0.9]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.0.7...v2.0.9
|
||||
[v2.0.7]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.0.6...v2.0.7
|
||||
[v2.0.6]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.0.5...v2.0.6
|
||||
[v2.0.5]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.04...v2.0.5
|
||||
[v2.04]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.0.3...v2.04
|
||||
[v2.0.3]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.0.2...v2.0.3
|
||||
[v2.0.2]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.0.1...v2.0.2
|
||||
[v2.0.1]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.0.0...v2.0.1
|
||||
[v2.0.0]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v1.0.7...v2.0.0
|
||||
[v1.0.7]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v1.0.6...v1.0.7
|
||||
[v1.0.6]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v1.0.5...v1.0.6
|
||||
[v1.0.5]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v1.0.4...v1.0.5
|
||||
[v1.0.4]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v1.0.3...v1.0.4
|
||||
[v1.0.3]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v1.0.1...v1.0.3
|
||||
[v1.0.1]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v1.0.0...v1.0.1
|
||||
@@ -0,0 +1,87 @@
|
||||
# Version logging for OpenIM
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_TOC -->
|
||||
|
||||
- [Version logging for OpenIM](#version-logging-for-openim)
|
||||
- [Unreleased](#unreleased)
|
||||
- [v3.1.2-beta.3 - 2023-08-09](#v312-beta3---2023-08-09)
|
||||
- [v3.1.2-beta.2 - 2023-08-09](#v312-beta2---2023-08-09)
|
||||
- [v3.1.2-beta.1 - 2023-08-09](#v312-beta1---2023-08-09)
|
||||
- [v3.1.2-beta.0 - 2023-08-08](#v312-beta0---2023-08-08)
|
||||
- [v3.1.2.beta.0 - 2023-08-08](#v312beta0---2023-08-08)
|
||||
- [v3.1.1-beta.4 - 2023-08-07](#v311-beta4---2023-08-07)
|
||||
- [v3.1.1-beta.3 - 2023-08-05](#v311-beta3---2023-08-05)
|
||||
- [v3.1.1-beta.2 - 2023-08-04](#v311-beta2---2023-08-04)
|
||||
- [v3.1.1-beta.1 - 2023-08-04](#v311-beta1---2023-08-04)
|
||||
- [v3.1.1-alpha.3 - 2023-08-03](#v311-alpha3---2023-08-03)
|
||||
- [v3.1.1-alpha.2 - 2023-08-03](#v311-alpha2---2023-08-03)
|
||||
- [v3.1.1-alpha.1 - 2023-08-02](#v311-alpha1---2023-08-02)
|
||||
- [v3.1.0 - 2023-07-28](#v310---2023-07-28)
|
||||
- [Reverts](#reverts)
|
||||
- [Pull Requests](#pull-requests)
|
||||
|
||||
|
||||
<!-- END MUNGE: GENERATED_TOC -->
|
||||
|
||||
<a name="unreleased"></a>
|
||||
## [Unreleased]
|
||||
|
||||
|
||||
<a name="v3.1.2-beta.3"></a>
|
||||
## [v3.1.2-beta.3] - 2023-08-09
|
||||
|
||||
<a name="v3.1.2-beta.2"></a>
|
||||
## [v3.1.2-beta.2] - 2023-08-09
|
||||
|
||||
<a name="v3.1.2-beta.1"></a>
|
||||
## [v3.1.2-beta.1] - 2023-08-09
|
||||
|
||||
<a name="v3.1.2-beta.0"></a>
|
||||
## [v3.1.2-beta.0] - 2023-08-08
|
||||
|
||||
<a name="v3.1.2.beta.0"></a>
|
||||
## [v3.1.2.beta.0] - 2023-08-08
|
||||
|
||||
<a name="v3.1.1-beta.4"></a>
|
||||
## [v3.1.1-beta.4] - 2023-08-07
|
||||
|
||||
<a name="v3.1.1-beta.3"></a>
|
||||
## [v3.1.1-beta.3] - 2023-08-05
|
||||
|
||||
<a name="v3.1.1-beta.2"></a>
|
||||
## [v3.1.1-beta.2] - 2023-08-04
|
||||
|
||||
<a name="v3.1.1-beta.1"></a>
|
||||
## [v3.1.1-beta.1] - 2023-08-04
|
||||
|
||||
<a name="v3.1.1-alpha.3"></a>
|
||||
## [v3.1.1-alpha.3] - 2023-08-03
|
||||
|
||||
<a name="v3.1.1-alpha.2"></a>
|
||||
## [v3.1.1-alpha.2] - 2023-08-03
|
||||
|
||||
<a name="v3.1.1-alpha.1"></a>
|
||||
## [v3.1.1-alpha.1] - 2023-08-02
|
||||
|
||||
<a name="v3.1.0"></a>
|
||||
## v3.1.0 - 2023-07-28
|
||||
### Reverts
|
||||
- update etcd to v3.5.2 ([#206](https://github.com/OpenIMSDK/Open-IM-Server/issues/206))
|
||||
|
||||
### Pull Requests
|
||||
- Merge branch 'tuoyun'
|
||||
|
||||
|
||||
[Unreleased]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v3.1.2-beta.3...HEAD
|
||||
[v3.1.2-beta.3]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v3.1.2-beta.2...v3.1.2-beta.3
|
||||
[v3.1.2-beta.2]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v3.1.2-beta.1...v3.1.2-beta.2
|
||||
[v3.1.2-beta.1]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v3.1.2-beta.0...v3.1.2-beta.1
|
||||
[v3.1.2-beta.0]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v3.1.2.beta.0...v3.1.2-beta.0
|
||||
[v3.1.2.beta.0]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v3.1.1-beta.4...v3.1.2.beta.0
|
||||
[v3.1.1-beta.4]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v3.1.1-beta.3...v3.1.1-beta.4
|
||||
[v3.1.1-beta.3]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v3.1.1-beta.2...v3.1.1-beta.3
|
||||
[v3.1.1-beta.2]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v3.1.1-beta.1...v3.1.1-beta.2
|
||||
[v3.1.1-beta.1]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v3.1.1-alpha.3...v3.1.1-beta.1
|
||||
[v3.1.1-alpha.3]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v3.1.1-alpha.2...v3.1.1-alpha.3
|
||||
[v3.1.1-alpha.2]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v3.1.1-alpha.1...v3.1.1-alpha.2
|
||||
[v3.1.1-alpha.1]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v3.1.0...v3.1.1-alpha.1
|
||||
@@ -0,0 +1,44 @@
|
||||
# Version logging for OpenIM
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_TOC -->
|
||||
|
||||
<!-- END MUNGE: GENERATED_TOC -->
|
||||
|
||||
<a name="unreleased"></a>
|
||||
## [Unreleased]
|
||||
|
||||
|
||||
<a name="v3.2.2-beta.3"></a>
|
||||
## [v3.2.2-beta.3] - 2023-08-22
|
||||
|
||||
<a name="v3.2.2-beta.2"></a>
|
||||
## [v3.2.2-beta.2] - 2023-08-21
|
||||
|
||||
<a name="v3.2.2-beta.1"></a>
|
||||
## [v3.2.2-beta.1] - 2023-08-19
|
||||
|
||||
<a name="v3.2.0"></a>
|
||||
## [v3.2.0] - 2023-08-18
|
||||
|
||||
<a name="v3.2.0-rc.0"></a>
|
||||
## [v3.2.0-rc.0] - 2023-08-17
|
||||
|
||||
<a name="v3.2.2-beta.0"></a>
|
||||
## [v3.2.2-beta.0] - 2023-08-17
|
||||
|
||||
<a name="v3.2.0-alpha.0"></a>
|
||||
## v3.2.0-alpha.0 - 2023-08-16
|
||||
### Reverts
|
||||
- update etcd to v3.5.2 ([#206](https://github.com/OpenIMSDK/Open-IM-Server/issues/206))
|
||||
|
||||
### Pull Requests
|
||||
- Merge branch 'tuoyun'
|
||||
|
||||
|
||||
[Unreleased]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v3.2.2-beta.3...HEAD
|
||||
[v3.2.2-beta.3]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v3.2.2-beta.2...v3.2.2-beta.3
|
||||
[v3.2.2-beta.2]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v3.2.2-beta.1...v3.2.2-beta.2
|
||||
[v3.2.2-beta.1]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v3.2.0...v3.2.2-beta.1
|
||||
[v3.2.0]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v3.2.0-rc.0...v3.2.0
|
||||
[v3.2.0-rc.0]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v3.2.2-beta.0...v3.2.0-rc.0
|
||||
[v3.2.2-beta.0]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v3.2.0-alpha.0...v3.2.2-beta.0
|
||||
@@ -0,0 +1,170 @@
|
||||
# Changelog
|
||||
|
||||
- [Changelog](#changelog)
|
||||
- [OpenIM versioning policy](#openim-versioning-policy)
|
||||
- [command](#command)
|
||||
- [install](#install)
|
||||
- [User](#user)
|
||||
- [create next tag](#create-next-tag)
|
||||
- [Release version logs](#release-version-logs)
|
||||
- [Introduction](#introduction)
|
||||
- [Naming Format](#naming-format)
|
||||
- [Examples](#examples)
|
||||
- [Version Modifiers](#version-modifiers)
|
||||
- [Versioning Strategy](#versioning-strategy)
|
||||
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
+ [https://github.com/OpenIMSDK/Open-IM-Server/releases](https://github.com/OpenIMSDK/Open-IM-Server/releases)
|
||||
|
||||
## OpenIM versioning policy
|
||||
|
||||
+ [OpenIM Version](../docs/conversions/version.md)
|
||||
|
||||
## command
|
||||
|
||||
To use git-chglog you need to configure:
|
||||
|
||||
1. CHANGELOG templates
|
||||
2. git-chglog configuration
|
||||
|
||||
### install
|
||||
|
||||
```bash
|
||||
$ go get github.com/git-chglog/git-chglog/cmd/git-chglog
|
||||
```
|
||||
|
||||
|
||||
## User
|
||||
|
||||
```bash
|
||||
$ git-chglog --init
|
||||
```
|
||||
|
||||
**Options**
|
||||
|
||||
- What is the URL of your repository?: https://github.com/OpenIMSDK/Open-IM-Server
|
||||
- What is your favorite style?: github
|
||||
- Choose the format of your favorite commit message: <type>(<scope>): <subject> -- feat(core): Add new feature
|
||||
- What is your favorite template style?: standard
|
||||
- Do you include Merge Commit in CHANGELOG?: n
|
||||
- Do you include Revert Commit in CHANGELOG?: y
|
||||
- In which directory do you output configuration files and templates?: .chglog
|
||||
|
||||
```bash
|
||||
git-chglog --tag-filter-pattern 'v2.0.*' -o CHANGELOG-2.0.md
|
||||
```
|
||||
|
||||
**Other uses:**
|
||||
|
||||
```bash
|
||||
$ git-chglog
|
||||
|
||||
If <tag query> is not specified, it corresponds to all tags.
|
||||
This is the simplest example.
|
||||
|
||||
$ git-chglog 1.0.0..2.0.0
|
||||
|
||||
The above is a command to generate CHANGELOG including commit of 1.0.0 to 2.0.0.
|
||||
|
||||
$ git-chglog 1.0.0
|
||||
|
||||
The above is a command to generate CHANGELOG including commit of only 1.0.0.
|
||||
|
||||
$ git-chglog $(git describe --tags $(git rev-list --tags --max-count=1))
|
||||
|
||||
The above is a command to generate CHANGELOG with the commit included in the latest tag.
|
||||
|
||||
$ git-chglog --output CHANGELOG.md
|
||||
|
||||
The above is a command to output to CHANGELOG.md instead of standard output.
|
||||
|
||||
$ git-chglog --config custom/dir/config.yml
|
||||
|
||||
The above is a command that uses a configuration file placed other than ".chglog/config.yml".
|
||||
```
|
||||
|
||||
|
||||
## create next tag
|
||||
|
||||
```bash
|
||||
git-chglog --next-tag 2.0.0 -o CHANGELOG.md
|
||||
git commit -am "release 2.0.0"
|
||||
git tag 2.0.0
|
||||
```
|
||||
|
||||
| Query | Description | Example |
|
||||
| -------------- | ---------------------------------------------- | --------------------------- |
|
||||
| `<old>..<new>` | Commit contained in `<new>` tags from `<old>`. | `$ git-chglog 1.0.0..2.0.0` |
|
||||
| `<name>..` | Commit from the `<name>` to the latest tag. | `$ git-chglog 1.0.0..` |
|
||||
| `..<name>` | Commit from the oldest tag to `<name>`. | `$ git-chglog ..2.0.0` |
|
||||
| `<name>` | Commit contained in `<name>`. | `$ git-chglog 1.0.0` |
|
||||
|
||||
|
||||
## Release version logs
|
||||
|
||||
+ [OpenIM CHANGELOG-V1.0](CHANGELOG-1.0.md)
|
||||
+ [OpenIM CHANGELOG-V2.0](CHANGELOG-2.0.md)
|
||||
+ [OpenIM CHANGELOG-V2.1](CHANGELOG-2.1.md)
|
||||
+ [OpenIM CHANGELOG-V2.2](CHANGELOG-2.2.md)
|
||||
+ [OpenIM CHANGELOG-V2.3](CHANGELOG-2.3.md)
|
||||
+ [OpenIM CHANGELOG-V2.9](CHANGELOG-2.9.md)
|
||||
+ [OpenIM CHANGELOG-V3.0](CHANGELOG-3.0.md)
|
||||
+ [OpenIM CHANGELOG-V3.1](CHANGELOG-3.1.md)
|
||||
|
||||
## Introduction
|
||||
|
||||
In both the open-source and closed-source software development communities, it is important to follow a consistent and understandable versioning scheme for software projects. This ensures clear communication of changes, compatibility, and stability across different releases. One widely adopted naming convention is the Semantic Versioning 2.0.0.
|
||||
|
||||
## Naming Format
|
||||
|
||||
The most common format for version numbers is as follows:
|
||||
|
||||
```
|
||||
major.minor[.patch[.build]]
|
||||
```
|
||||
|
||||
Let's take a closer look at each component:
|
||||
|
||||
1. **Major Version**: This is the first number in the versioning scheme and indicates significant changes that may not be backward compatible (specific to each project).
|
||||
2. **Minor Version**: The second number signifies the addition of new features while maintaining backward compatibility.
|
||||
3. **Patch Version**: The third number represents bug fixes or code optimizations without introducing new features. It is generally backward compatible.
|
||||
4. **Build Version**: Typically an automatically generated number that increments with each code commit.
|
||||
|
||||
## Examples
|
||||
|
||||
Here are a few examples to illustrate the versioning scheme:
|
||||
|
||||
1. `1.0`
|
||||
2. `2.14.0.1478`
|
||||
3. `3.2.1 build-354`
|
||||
|
||||
## Version Modifiers
|
||||
|
||||
Apart from the version numbers, there are also version modifiers used to indicate specific stages or statuses of a release. Some commonly used version modifiers include:
|
||||
|
||||
- **alpha**: An internal testing version with numerous known bugs. It is primarily used for communication among developers.
|
||||
- **beta**: A testing version released to enthusiastic users for feedback and bug detection.
|
||||
- **rc (release candidate)**: The final testing version before the official release.
|
||||
- **ga (general availability)**: The initial stable release for public distribution.
|
||||
- **r/release** (or no modifier at all): The final released version intended for general users.
|
||||
- **lts (long-term support)**: Designates a version that will receive extended maintenance and bug fixes for a specified number of years.
|
||||
|
||||
## Versioning Strategy
|
||||
|
||||
To effectively manage version numbers, the following strategies are commonly employed:
|
||||
|
||||
- The initial version of a project can be either `0.1` or `1.0`.
|
||||
- When fixing bugs, the patch version is incremented by 1.
|
||||
- When adding new features, the minor version is incremented by 1, and the patch version is reset to 0.
|
||||
- In the case of significant modifications, the major version is incremented by 1.
|
||||
- The build version is usually automatically generated by the compilation process and follows a defined format. It does not require manual control.
|
||||
|
||||
By adhering to these strategies and guidelines, developers can maintain consistency and clarity in versioning their software projects. This enables users and collaborators to understand the nature of changes between different releases and ensure compatibility with their systems.
|
||||
|
||||
(Note: Markdown formatting has been used to structure this article. Markdown is a lightweight markup language used to format text on platforms like GitHub.)
|
||||
|
||||
------
|
||||
|
||||
**Note**: The above article is based on the given content and aims to provide a Markdown-formatted English article explaining the naming conventions for software project versions, specifically focusing on the Semantic Versioning 2.0.0.
|
||||
+1
-1
@@ -60,7 +60,7 @@ representative at an online or offline event.
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported to the community leaders responsible for enforcement at
|
||||
`security@openim.io`.
|
||||
3293172751nss@gmail.com.
|
||||
All complaints will be reviewed and investigated promptly and fairly.
|
||||
|
||||
All community leaders are obligated to respect the privacy and security of the
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
|
||||
|
||||
# 如何给 OpenIM 贡献代码(提交 Pull Request)
|
||||
|
||||
<p align="center">
|
||||
<a href="./CONTRIBUTING.md">English</a> ·
|
||||
<a href="./CONTRIBUTING-zh_CN.md">中文</a> ·
|
||||
<a href="docs/contributing/CONTRIBUTING-UA.md">Українська</a> ·
|
||||
<a href="docs/contributing/CONTRIBUTING-CS.md">Česky</a> ·
|
||||
<a href="docs/contributing/CONTRIBUTING-HU.md">Magyar</a> ·
|
||||
<a href="docs/contributing/CONTRIBUTING-ES.md">Español</a> ·
|
||||
<a href="docs/contributing/CONTRIBUTING-FA.md">فارسی</a> ·
|
||||
<a href="docs/contributing/CONTRIBUTING-FR.md">Français</a> ·
|
||||
<a href="docs/contributing/CONTRIBUTING-DE.md">Deutsch</a> ·
|
||||
<a href="docs/contributing/CONTRIBUTING-PL.md">Polski</a> ·
|
||||
<a href="docs/contributing/CONTRIBUTING-ID.md">Indonesian</a> ·
|
||||
<a href="docs/contributing/CONTRIBUTING-FI.md">Suomi</a> ·
|
||||
<a href="docs/contributing/CONTRIBUTING-ML.md">മലയാളം</a> ·
|
||||
<a href="docs/contributing/CONTRIBUTING-JP.md">日本語</a> ·
|
||||
<a href="docs/contributing/CONTRIBUTING-NL.md">Nederlands</a> ·
|
||||
<a href="docs/contributing/CONTRIBUTING-IT.md">Italiano</a> ·
|
||||
<a href="docs/contributing/CONTRIBUTING-RU.md">Русский</a> ·
|
||||
<a href="docs/contributing/CONTRIBUTING-PTBR.md">Português (Brasil)</a> ·
|
||||
<a href="docs/contributing/CONTRIBUTING-EO.md">Esperanto</a> ·
|
||||
<a href="docs/contributing/CONTRIBUTING-KR.md">한국어</a> ·
|
||||
<a href="docs/contributing/CONTRIBUTING-AR.md">العربي</a> ·
|
||||
<a href="docs/contributing/CONTRIBUTING-VN.md">Tiếng Việt</a> ·
|
||||
<a href="docs/contributing/CONTRIBUTING-DA.md">Dansk</a> ·
|
||||
<a href="docs/contributing/CONTRIBUTING-GR.md">Ελληνικά</a> ·
|
||||
<a href="docs/contributing/CONTRIBUTING-TR.md">Türkçe</a>
|
||||
</p>
|
||||
|
||||
本指南将以 [openimsdk/open-im-server](https://github.com/openimsdk/open-im-server) 为例,详细说明如何为 OpenIM 项目贡献代码。我们采用“一问题一分支”的策略,确保每个 Issue 都对应一个专门的分支,以便有效管理代码变更。
|
||||
|
||||
### 1. Fork 仓库
|
||||
前往 [openimsdk/open-im-server](https://github.com/openimsdk/open-im-server) GitHub 页面,点击右上角的 "Fork" 按钮,将仓库 Fork 到你的 GitHub 账户下。
|
||||
|
||||
### 2. 克隆仓库
|
||||
将你 Fork 的仓库克隆到本地:
|
||||
```bash
|
||||
git clone https://github.com/your-username/open-im-server.git
|
||||
```
|
||||
|
||||
### 3. 设置远程上游
|
||||
添加原始仓库为远程上游以便跟踪其更新:
|
||||
```bash
|
||||
git remote add upstream https://github.com/openimsdk/open-im-server.git
|
||||
```
|
||||
|
||||
### 4. 创建 Issue
|
||||
在原始仓库中创建一个新的 Issue,详细描述你遇到的问题或希望添加
|
||||
|
||||
的新功能。
|
||||
|
||||
### 5. 创建新分支
|
||||
基于主分支创建一个新分支,并使用描述性的名称与 Issue ID,例如:
|
||||
```bash
|
||||
git checkout -b fix-bug-123
|
||||
```
|
||||
|
||||
### 6. 提交更改
|
||||
在你的本地分支上进行更改后,提交这些更改:
|
||||
```bash
|
||||
git add .
|
||||
git commit -m "Describe your changes in detail"
|
||||
```
|
||||
|
||||
### 7. 推送分支
|
||||
将你的分支推送回你的 GitHub Fork:
|
||||
```bash
|
||||
git push origin fix-bug-123
|
||||
```
|
||||
|
||||
### 8. 创建 Pull Request
|
||||
在 GitHub 上转到你的 Fork 仓库,点击 "Pull Request" 按钮。确保 PR 描述清楚,并链接到相关的 Issue。
|
||||
|
||||
### 9. 签署 CLA
|
||||
如果这是你第一次提交 PR,你需要在 PR 的评论中回复:
|
||||
```
|
||||
I have read the CLA Document and I hereby sign the CLA
|
||||
```
|
||||
|
||||
### 编程规范
|
||||
请参考以下文档以了解关于 Go 语言编程规范的详细信息:
|
||||
- [Go 编码规范](https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/go-code.md)
|
||||
- [代码约定](https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/code-conventions.md)
|
||||
|
||||
### 日志规范
|
||||
- **禁止使用标准的 `log` 包**。
|
||||
- 应使用 `"github.com/openimsdk/tools/log"` 包来打印日志,该包支持多种日志级别:`debug`、`info`、`warn`、`error`。
|
||||
- **错误日志应仅在首次调用的函数中打印**,以防止日志重复,并确保错误的上下文清晰。
|
||||
|
||||
### 异常及错误处理
|
||||
- **禁止使用 `panic`**:程序中不应使用 `panic`,以避免在遇到不可恢复的错误时突然终止。
|
||||
- **错误包裹**:使用 `"github.com/openimsdk/tools/errs"` 来包裹错误,保持错误信息的完整性并增加调试便利。
|
||||
- **错误传递**:如果函数本身不能处理错误,应将错误返回给调用者,而不是隐藏或忽略这些错误。
|
||||
+356
-74
@@ -1,94 +1,376 @@
|
||||
# How to Contribute to OpenIM (Submitting Pull Requests)
|
||||
# Contributing to Open-IM-Server
|
||||
|
||||
<p align="center">
|
||||
<a href="./CONTRIBUTING.md">English</a> ·
|
||||
<a href="./CONTRIBUTING-zh_CN.md">中文</a> ·
|
||||
<a href="docs/contributing/CONTRIBUTING-UA.md">Українська</a> ·
|
||||
<a href="docs/contributing/CONTRIBUTING-CS.md">Česky</a> ·
|
||||
<a href="docs/contributing/CONTRIBUTING-HU.md">Magyar</a> ·
|
||||
<a href="docs/contributing/CONTRIBUTING-ES.md">Español</a> ·
|
||||
<a href="docs/contributing/CONTRIBUTING-FA.md">فارسی</a> ·
|
||||
<a href="docs/contributing/CONTRIBUTING-FR.md">Français</a> ·
|
||||
<a href="docs/contributing/CONTRIBUTING-DE.md">Deutsch</a> ·
|
||||
<a href="docs/contributing/CONTRIBUTING-PL.md">Polski</a> ·
|
||||
<a href="docs/contributing/CONTRIBUTING-ID.md">Indonesian</a> ·
|
||||
<a href="docs/contributing/CONTRIBUTING-FI.md">Suomi</a> ·
|
||||
<a href="docs/contributing/CONTRIBUTING-ML.md">മലയാളം</a> ·
|
||||
<a href="docs/contributing/CONTRIBUTING-JP.md">日本語</a> ·
|
||||
<a href="docs/contributing/CONTRIBUTING-NL.md">Nederlands</a> ·
|
||||
<a href="docs/contributing/CONTRIBUTING-IT.md">Italiano</a> ·
|
||||
<a href="docs/contributing/CONTRIBUTING-RU.md">Русский</a> ·
|
||||
<a href="docs/contributing/CONTRIBUTING-PTBR.md">Português (Brasil)</a> ·
|
||||
<a href="docs/contributing/CONTRIBUTING-EO.md">Esperanto</a> ·
|
||||
<a href="docs/contributing/CONTRIBUTING-KR.md">한국어</a> ·
|
||||
<a href="docs/contributing/CONTRIBUTING-AR.md">العربي</a> ·
|
||||
<a href="docs/contributing/CONTRIBUTING-VN.md">Tiếng Việt</a> ·
|
||||
<a href="docs/contributing/CONTRIBUTING-DA.md">Dansk</a> ·
|
||||
<a href="docs/contributing/CONTRIBUTING-GR.md">Ελληνικά</a> ·
|
||||
<a href="docs/contributing/CONTRIBUTING-TR.md">Türkçe</a>
|
||||
</p>
|
||||
So, you want to hack on Open-IM-Server? Yay!
|
||||
|
||||
This guide will use [openimsdk/open-im-server](https://github.com/openimsdk/open-im-server) as an example to explain in detail how to contribute code to the OpenIM project. We adopt a "one issue, one branch" strategy to ensure each issue corresponds to a dedicated branch for effective code change management.
|
||||
First of all, thank you for considering contributing to our project! We appreciate your time and effort, and we value any contribution, whether it's reporting a bug, suggesting a new feature, or submitting a pull request.
|
||||
|
||||
### 1. Fork the Repository
|
||||
Go to the [openimsdk/open-im-server](https://github.com/openimsdk/open-im-server) GitHub page, click the "Fork" button in the upper right corner to fork the repository to your GitHub account.
|
||||

|
||||
|
||||
> Use `make demo` start contributing fast.
|
||||
|
||||
This document provides guidelines and best practices to help you contribute effectively.
|
||||
|
||||
## 📇Topics
|
||||
|
||||
- [Contributing to Open-IM-Server](#contributing-to-open-im-server)
|
||||
- [📇Topics](#topics)
|
||||
- [What we expect of you](#what-we-expect-of-you)
|
||||
- [Code of ConductCode of Conduct](#code-of-conductcode-of-conduct)
|
||||
- [Code and doc contribution](#code-and-doc-contribution)
|
||||
- [Where should I start?](#where-should-i-start)
|
||||
- [Design documents](#design-documents)
|
||||
- [Getting Started](#getting-started)
|
||||
- [Style and Specification](#style-and-specification)
|
||||
- [Reporting security issues](#reporting-security-issues)
|
||||
- [Reporting general issues](#reporting-general-issues)
|
||||
- [Commit Rules](#commit-rules)
|
||||
- [PR Description](#pr-description)
|
||||
- [Docs Contribution](#docs-contribution)
|
||||
- [Engage to help anything](#engage-to-help-anything)
|
||||
- [Release version](#release-version)
|
||||
- [Contact Us](#contact-us)
|
||||
|
||||
## What we expect of you
|
||||
|
||||
We hope that anyone can join Open-IM-Server , even if you are a student, writer, translator
|
||||
|
||||
Please meet the minimum version of the Go language published in [go.mod](./go.mod). If you want to manage the Go language version, we provide tools to install [gvm](https://github.com/moovweb/gvm) in our [Makefile](./Makefile)
|
||||
|
||||
You'd better use Linux OR WSL as the development environment, Linux with [Makefile](./Makefile) can help you quickly build and test Open-IM-Server project.
|
||||
|
||||
If you are familiar with [Makefile](./Makefile) , you can easily see the clever design of the Open-IM-Server Makefile. Storing the necessary tools such as golangci in the `/tools` directory can avoid some tool version issues.
|
||||
|
||||
The [Makefile](./Makefile) is for every developer, even if you don't know how to use the Makefile tool, don't worry, we provide two great commands to get you up to speed with the Makefile architecture, `make help` and `make help-all`, it can reduce problems of the developing environment.
|
||||
|
||||
## Code of ConductCode of Conduct
|
||||
|
||||
#### Code and doc contribution
|
||||
|
||||
Every action to make project Open-IM-Server better is encouraged. On GitHub, every improvement for Open-IM-Server could be via a [PR](https://github.com/OpenIMSDK/Open-IM-Server/pulls) (short for pull request).
|
||||
|
||||
+ If you find a typo, try to fix it!
|
||||
+ If you find a bug, try to fix it!
|
||||
+ If you find some redundant codes, try to remove them!
|
||||
+ If you find some test cases missing, try to add them!
|
||||
+ If you could enhance a feature, please **DO NOT** hesitate!
|
||||
+ If you find code implicit, try to add comments to make it clear!
|
||||
+ If you find code ugly, try to refactor that!
|
||||
+ If you can help to improve documents, it could not be better!
|
||||
+ If you find document incorrect, just do it and fix that!
|
||||
+ ...
|
||||
|
||||
#### Where should I start?
|
||||
|
||||
+ If you are new to the project, don't know how to contribute Open-IM-Server, please check out the [good first issue](https://github.com/OpenIMSDK/Open-IM-Server/issues?q=is%3Aopen+label%3A"good+first+issue"+sort%3Aupdated-desc) label.
|
||||
+ You should be good at filtering the Open-IM-Server issue tags and finding the ones you like, such as [RFC](https://github.com/OpenIMSDK/Open-IM-Server/issues?q=is%3Aissue+is%3Aopen+RFC+label%3ARFC) for big initiatives, features for [feature](https://github.com/OpenIMSDK/Open-IM-Server/issues?q=is%3Aissue+label%3Afeature) proposals, and [bug](https://github.com/OpenIMSDK/Open-IM-Server/issues?q=is%3Aissue+label%3Abug+) fixes.
|
||||
+ If you are looking for something to work on, check out our [open issues](https://github.com/OpenIMSDK/Open-IM-Server/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc).
|
||||
+ If you have an idea for a new feature, please [open an issue](https://github.com/OpenIMSDK/Open-IM-Server/issues/new/choose), and we can discuss it.
|
||||
|
||||
#### Design documents
|
||||
|
||||
For any substantial design, there should be a well-crafted design document. This document is not just a simple record, but also a detailed description and manifestation, which can help team members better understand the design thinking and grasp the design direction. In the process of writing the design document, we can choose to use tools such as `Google Docs` or `Notion`, and even mark RFC in [issues](https://github.com/OpenIMSDK/Open-IM-Server/issues?q=is%3Aissue+is%3Aopen+RFC+label%3ARFC) or [discussions](https://github.com/OpenIMSDK/Open-IM-Server/discussions) for better collaboration. Of course, after completing the design document, we should also add it to our [Shared Drive](https://drive.google.com/drive/) and notify the appropriate working group to let everyone know of its existence. Only by doing so can we maximize the effectiveness of the design document and provide strong support for the smooth progress of the project.
|
||||
|
||||
Anybody can access the shared Drive for reading. To get access to comment. Once you've done that, head to the [shared Drive](https://drive.google.com/) and behold all the docs.
|
||||
|
||||
In addition to that, we'd love to invite you to [join our Slack](https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg) where you can play with your imagination, tell us what you're working on, and get a quick response.
|
||||
|
||||
When documenting a new design, we recommend a 2-step approach:
|
||||
|
||||
1. Use the short-form RFC template to outline your ideas and get early feedback.
|
||||
2. Once you have received sufficient feedback and consensus, you may use the longer-form design doc template to specify and discuss your design in more details.
|
||||
|
||||
In order to contribute a feature to Open-IM-Server you'll need to go through the following steps:
|
||||
|
||||
+ Discuss your idea with the appropriate [working groups](https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg) on the working group's Slack channel.
|
||||
+ Once there is general agreement that the feature is useful, create a GitHub issue to track the discussion. The issue should include information about the requirements and use cases that it is trying to address.
|
||||
+ Include a discussion of the proposed design and technical details of the implementation in the issue.
|
||||
|
||||
But keep in mind that there is no guarantee of it being accepted and so it is usually best to get agreement on the idea/design before time is spent coding it. However, sometimes seeing the exact code change can help focus discussions, so the choice is up to you.
|
||||
|
||||
## Getting Started
|
||||
|
||||
To propose PR for the Open-IM-Server item, we assume you have registered a GitHub ID. Then you could finish the preparation in the following steps:
|
||||
|
||||
1. Fork the repository(Open-IM-Server)
|
||||
|
||||
2. **CLONE** your own repository to main locally. Use `git clone https://github.com/<your-username>/Open-IM-Server.git` to clone repository to your local machine. Then you can create new branches to finish the change you wish to make.
|
||||
|
||||
3. **Set Remote** upstream to be `https://github.com/OpenIMSDK/Open-IM-Server.git` using the following two commands:
|
||||
|
||||
```bash
|
||||
❯ git remote add upstream https://github.com/OpenIMSDK/Open-IM-Server.git
|
||||
❯ git remote set-url --push upstream no-pushing
|
||||
```
|
||||
|
||||
With this remote setting, you can check your git remote configuration like this:
|
||||
|
||||
```bash
|
||||
❯ git remote -v
|
||||
origin https://github.com/<your-username>/Open-IM-Server.git (fetch)
|
||||
origin https://github.com/<your-username>/Open-IM-Server.git (push)
|
||||
upstream https://github.com/OpenIMSDK/Open-IM-Server.git (fetch)
|
||||
upstream no-pushing (push)
|
||||
```
|
||||
|
||||
Adding this, we can easily synchronize local branches with upstream branches.
|
||||
|
||||
4. Create a new branch for your changes (use a descriptive name, such as `fix-bug-123` or `add-new-feature`).
|
||||
|
||||
```bash
|
||||
❯ cd Open-IM-Server
|
||||
❯ git fetch upstream
|
||||
❯ git checkout upstream/main
|
||||
```
|
||||
|
||||
Create a new branch:
|
||||
|
||||
```bash
|
||||
❯ git checkout -b <new-branch>
|
||||
```
|
||||
|
||||
Make any change on the `new-branch` then use [Makefile](./Makefile) build and test your codes.
|
||||
|
||||
5. **Commit your changes** to your local branch, lint before committing and commit with sign-off
|
||||
|
||||
```bash
|
||||
❯ git rebase upstream/main
|
||||
❯ make lint # golangci-lint run -c .golangci.yml
|
||||
❯ git add -A # add changes to staging
|
||||
❯ git commit -a -s -m "message for your changes" # -s adds a Signed-off-by trailer
|
||||
```
|
||||
|
||||
6. **Push your branch** to your forked repository, it is recommended to have only one commit for a PR.
|
||||
|
||||
```bash
|
||||
# sync up with upstream
|
||||
❯ git fetch upstream main
|
||||
❯ git rebase upstream/main
|
||||
❯
|
||||
❯ git rebase -i <commit-id> # rebase with interactive mode to squash your commits into a single one
|
||||
❯ git push # push to the remote repository, if it's a first time push, run git push --set-upstream origin <new-branch># sync up with upstream
|
||||
❯ git fetch upstream main
|
||||
git rebase upstream/main
|
||||
|
||||
❯ git rebase -i <commit-id> # rebase with interactive mode to squash your commits into a single one
|
||||
❯ git push # push to the remote repository, if it's a first time push, run git push --set-upstream origin <new-branch>
|
||||
```
|
||||
|
||||
You can also use `git commit -s --amend && git push -f` to update modifications on the previous commit.
|
||||
|
||||
If you have developed multiple features in the same branch, you should create PR separately by rebasing to the main branch between each push:
|
||||
|
||||
```bash
|
||||
# create new branch, for example git checkout -b feature/infra
|
||||
❯ git checkout -b <new branch>
|
||||
# update some code, feature1
|
||||
❯ git add -A
|
||||
❯ git commit -m -s "feat: feature one"
|
||||
❯ git push # if it's first time push, run git push --set-upstream origin <new-branch>
|
||||
# then create pull request, and merge
|
||||
# update some new feature, feature2, rebase main branch first.
|
||||
❯ git rebase upstream/main # rebase the current branch to upstream/main branch
|
||||
❯ git add -A
|
||||
❯ git commit -m -s "feat: feature two"
|
||||
# then create pull request, and merge
|
||||
```
|
||||
|
||||
7. **Open a pull request** to `OpenIMSDK/Open-IM-Server:main`
|
||||
|
||||
It is recommended to review your changes before filing a pull request. Check if your code doesn't conflict with the main branch and no redundant code is included.
|
||||
|
||||
## Style and Specification
|
||||
|
||||
We divide the problem into security and general problems:
|
||||
|
||||
#### Reporting security issues
|
||||
|
||||
Security issues are always treated seriously. As our usual principle, we discourage anyone to spread security issues. If you find a security issue of Open-IM-Server, please do not discuss it in public and even do not open a public issue.
|
||||
|
||||
Instead we encourage you to send us a private email to winxu81@gmail.com to report this.
|
||||
|
||||
#### Reporting general issues
|
||||
|
||||
To be honest, we regard every user of Open-IM-Serveras a very kind contributor. After experiencing Open-IM-Server, you may have some feedback for the project. Then feel free to open an issue via [NEW ISSUE](https://github.com/OpenIMSDK/Open-IM-Server/issues/new/choose).
|
||||
|
||||
Since we collaborate project Open-IM-Server in a distributed way, we appreciate **WELL-WRITTEN**, **DETAILED**, **EXPLICIT** issue reports. To make the communication more efficient, we wish everyone could search if your issue is an existing one in the searching list. If you find it existing, please add your details in comments under the existing issue instead of opening a brand new one.
|
||||
|
||||
To make the issue details as standard as possible, we setup an [ISSUE TEMPLATE](https://github.com/OpenIMSDK/.github/tree/main/.github/ISSUE_TEMPLATE) for issue reporters. You can find three kinds of issue templates there: question, bug report and feature request. Please **BE SURE** to follow the instructions to fill fields in template.
|
||||
|
||||
**There are a lot of cases when you could open an issue:**
|
||||
|
||||
+ bug report
|
||||
+ feature request
|
||||
+ Open-IM-Server performance issues
|
||||
+ feature proposal
|
||||
+ feature design
|
||||
+ help wanted
|
||||
+ doc incomplete
|
||||
+ test improvement
|
||||
+ any questions on Open-IM-Server project
|
||||
+ and so on
|
||||
|
||||
Also, we must be reminded when submitting a new question about Open-IM-Server, please remember to remove the sensitive data from your post. Sensitive data could be password, secret key, network locations, private business data and so on.
|
||||
|
||||
#### Commit Rules
|
||||
|
||||
Actually in Open-IM-Server, we take two rules serious when committing:
|
||||
|
||||
**🥇 Commit Message:**
|
||||
|
||||
Commit message could help reviewers better understand what the purpose of submitted PR is. It could help accelerate the code review procedure as well. We encourage contributors to use **EXPLICIT** commit message rather than ambiguous message. In general, we advocate the following commit message type:
|
||||
|
||||
We use [Semantic Commits](https://www.conventionalcommits.org/en/v1.0.0/) to make it easier to understand what a commit does and to build pretty changelogs. Please use the following prefixes for your commits:
|
||||
|
||||
+ `docs: xxxx`. For example, "docs: add docs about storage installation".
|
||||
+ `feature: xxxx`.For example, "feature: make result show in sorted order".
|
||||
+ `bugfix: xxxx`. For example, "bugfix: fix panic when input nil parameter".
|
||||
+ `style: xxxx`. For example, "style: format the code style of Constants.java".
|
||||
+ `refactor: xxxx.` For example, "refactor: simplify to make codes more readable".
|
||||
+ `test: xxx`. For example, "test: add unit test case for func InsertIntoArray".
|
||||
+ `chore: xxx.` For example, "chore: integrate travis-ci". It's the type of mantainance change.
|
||||
+ other readable and explicit expression ways.
|
||||
|
||||
On the other side, we discourage contributors from committing message like the following ways:
|
||||
|
||||
+ ~~fix bug~~
|
||||
+ ~~update~~
|
||||
+ ~~add doc~~
|
||||
|
||||
**🥈 Commit Content:**
|
||||
|
||||
Commit content represents all content changes included in one commit. We had better include things in one single commit which could support reviewer's complete review without any other commits' help.
|
||||
|
||||
In another word, contents in one single commit can pass the CI to avoid code mess. In brief, there are two minor rules for us to keep in mind:
|
||||
|
||||
1. avoid very large change in a commit.
|
||||
2. complete and reviewable for each commit.
|
||||
3. words are written in lowercase English, not uppercase English or other languages such as Chinese.
|
||||
|
||||
No matter what the commit message, or commit content is, we do take more emphasis on code review.
|
||||
|
||||
An example for this could be:
|
||||
|
||||
### 2. Clone the Repository
|
||||
Clone the repository you forked to your local machine:
|
||||
```bash
|
||||
git clone https://github.com/your-username/open-im-server.git
|
||||
❯ git commit -a -s -m "docs: add a new section to the README"
|
||||
```
|
||||
|
||||
### 3. Set Upstream Remote
|
||||
Add the original repository as a remote upstream to track updates:
|
||||
#### PR Description
|
||||
|
||||
PR is the only way to make change to Open-IM-Server project files. To help reviewers better get your purpose, PR description could not be too detailed. We encourage contributors to follow the [PR template](https://github.com/OpenIMSDK/.github/tree/main/.github/PULL_REQUEST_TEMPLATE.md) to finish the pull request.
|
||||
|
||||
You can find some very formal PR in [RFC](https://github.com/OpenIMSDK/Open-IM-Server/issues?q=is%3Aissue+is%3Aopen+RFC+label%3ARFC) issues and learn about them.
|
||||
|
||||
**📖 Opening PRs:**
|
||||
|
||||
+ As long as you are working on your PR, please mark it as a draft
|
||||
+ Please make sure that your PR is up-to-date with the latest changes in `main`
|
||||
+ Mention the issue that your PR is addressing (Fix: #{ID_1}, #{ID_2})
|
||||
+ Make sure that your PR passes all checks
|
||||
|
||||
**🈴 Reviewing PRs:**
|
||||
|
||||
+ Be respectful and constructive
|
||||
+ Assign yourself to the PR
|
||||
+ Check if all checks are passing
|
||||
+ Suggest changes instead of simply commenting on found issues
|
||||
+ If you are unsure about something, ask the author
|
||||
+ If you are not sure if the changes work, try them out
|
||||
+ Reach out to other reviewers if you are unsure about something
|
||||
+ If you are happy with the changes, approve the PR
|
||||
+ Merge the PR once it has all approvals and the checks are passing
|
||||
|
||||
**⚠️ DCO check:**
|
||||
|
||||
We have a DCO check that runs on every pull request to ensure code quality and maintainability. This check verifies that the commit has been signed off, indicating that you have read and agreed to the provisions of the Developer Certificate of Origin. If you have not yet signed off on the commit, you can use the following command to sign off on the last commit you made:
|
||||
|
||||
```bash
|
||||
git remote add upstream https://github.com/openimsdk/open-im-server.git
|
||||
❯ git commit --amend --signoff
|
||||
```
|
||||
|
||||
### 4. Create an Issue
|
||||
Create a new issue in the original repository detailing the problem you encountered or the new feature you wish to add.
|
||||
Please note that signing off on a commit is a commitment that you have read and agreed to the provisions of the Developer Certificate of Origin. If you have not yet read this document, we strongly recommend that you take some time to read it carefully. If you have any questions about the content of this document, or if you need further assistance, please contact an administrator or relevant personnel.
|
||||
|
||||
### 5. Create a New Branch
|
||||
Create a new branch off the main branch with a descriptive name and Issue ID, for example:
|
||||
```bash
|
||||
git checkout -b fix-bug-123
|
||||
You can also automate signing off your commits by adding the following to your `.zshrc` or `.bashrc`:
|
||||
|
||||
```go
|
||||
git() {
|
||||
if [ $# -gt 0 ] && [[ "$1" == "commit" ]] ; then
|
||||
shift
|
||||
command git commit --signoff "$@"
|
||||
else
|
||||
command git "$@"
|
||||
fi
|
||||
}
|
||||
```
|
||||
|
||||
### 6. Commit Changes
|
||||
After making changes on your local branch, commit these changes:
|
||||
```bash
|
||||
git add .
|
||||
git commit -m "Describe your changes
|
||||
|
||||
in detail"
|
||||
```
|
||||
#### Docs Contribution
|
||||
|
||||
### 7. Push the Branch
|
||||
Push your branch back to your GitHub fork:
|
||||
```bash
|
||||
git push origin fix-bug-123
|
||||
```
|
||||
The documentation for Open-IM-Server includes:
|
||||
|
||||
### 8. Create a Pull Request
|
||||
Go to your fork on GitHub and click the "Pull Request" button. Ensure the PR description is clear and links to the related issue.
|
||||
+ [README.md](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/README.md): This file includes the basic information and instructions for getting started with Open-IM-Server.
|
||||
+ [CONTRIBUTING.md](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/CONTRIBUTING.md): This file contains guidelines for contributing to Open-IM-Server's codebase, such as how to submit issues, pull requests, and code reviews.
|
||||
+ [Official Documentation](https://doc.rentsoft.cn/): This is the official documentation for Open-IM-Server, which includes comprehensive information on all of its features, configuration options, and troubleshooting tips.
|
||||
|
||||
### 9. Sign the CLA
|
||||
If this is your first time submitting a PR, you will need to reply in the comments of the PR:
|
||||
```
|
||||
I have read the CLA Document and I hereby sign the CLA
|
||||
```
|
||||
Please obey the following rules to better format the docs, which would greatly improve the reading experience.
|
||||
|
||||
### Programming Standards
|
||||
Please refer to the following documents for detailed information on Go language programming standards:
|
||||
- [Go Coding Standards](https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/go-code.md)
|
||||
- [Code Conventions](https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/code-conventions.md)
|
||||
1. Please do not use Chinese punctuations in English docs, and vice versa.
|
||||
2. Please use upper case letters where applicable, like the first letter of sentences / headings, etc.
|
||||
3. Please specify a language for each Markdown code blocks, unless there's no associated languages.
|
||||
4. Please insert a whitespace between Chinese and English words.
|
||||
5. Please use the correct case for technical terms, such as using `HTTP` instead of http, `MySQL` rather than mysql, `Kubernetes` instead of kubernetes, etc.
|
||||
6. Please check if there's any typos in the docs before submitting PRs.
|
||||
|
||||
### Logging Standards
|
||||
- **Do not use the standard `log` package**.
|
||||
- Use the `"github.com/openimsdk/tools/log"` package for logging, which supports multiple log levels: `debug`, `info`, `warn`, `error`.
|
||||
- **Error logs should only be printed in the function where they are first actively called** to prevent log duplication and ensure clear error context.
|
||||
## Engage to help anything
|
||||
|
||||
### Exception and Error Handling
|
||||
- **Prohibit the use of `panic`**: The code should not use `panic` to avoid abrupt termination when encountering unrecoverable errors.
|
||||
- **Error Wrapping**: Use `"github.com/openimsdk/tools/errs"` to wrap errors, maintaining the integrity of error information and facilitating debugging.
|
||||
- **Error Propagation**: If a function cannot handle an error itself, it should return the error to the caller, rather than hiding or ignoring it.
|
||||
We choose GitHub as the primary place for Open-IM-Server to collaborate. So the latest updates of Open-IM-Server are always here. Although contributions via PR is an explicit way to help, we still call for any other ways.
|
||||
|
||||
+ reply to other's [issues](https://github.com/OpenIMSDK/Open-IM-Server/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc) if you could;
|
||||
+ help solve other user's problems;
|
||||
+ help review other's [PR](https://github.com/OpenIMSDK/Open-IM-Server/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc) design;
|
||||
+ discuss about Open-IM-Server to make things clearer;
|
||||
+ advocate [Open-IM-Server](https://google.com/search?q=Open-IM-Server) technology beyond GitHub;
|
||||
+ write blogs on Open-IM-Server and so on.
|
||||
|
||||
In a word, **ANY HELP IS CONTRIBUTION.**
|
||||
|
||||
## Release version
|
||||
|
||||
Releases of Open-IM-Server are done using [Release Please](https://github.com/googleapis/release-please) and [GoReleaser](https://goreleaser.com/). The workflow looks like this:
|
||||
|
||||
🎯 A PR is merged to the `main` branch:
|
||||
|
||||
+ Release please is triggered, creates or updates a new release PR
|
||||
+ This is done with every merge to main, the current release PR is updated every time
|
||||
|
||||
🎯 Merging the 'release please' PR to `main`:
|
||||
|
||||
+ Release please is triggered, creates a new release and updates the changelog based on the commit messages
|
||||
+ GoReleaser is triggered, builds the binaries and attaches them to the release
|
||||
+ Containers are created and pushed to the container registry
|
||||
|
||||
With the next relevant merge, a new release PR will be created and the process starts again
|
||||
|
||||
**👀 Manually setting the version:**
|
||||
|
||||
If you want to manually set the version, you can create a PR with an empty commit message that contains the version number in the commit message. For example:
|
||||
|
||||
Such a commit can get produced as follows:
|
||||
|
||||
````bash
|
||||
❯ git commit --allow-empty -m "chore: release 0.0.3" -m "Release-As: 0.0.3
|
||||
````
|
||||
|
||||
## Contact Us
|
||||
|
||||
We value close connections with our users, developers, and contributors here at Open-IM-Server. With a large community and maintainer team, we're always here to help and support you. Whether you're looking to join our community or have any questions or suggestions, we welcome you to get in touch with us.
|
||||
|
||||
Our most recommended way to get in touch is through [Slack](https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg). Even if you're in China, Slack is usually not blocked by firewalls, making it an easy way to connect with us. Our Slack community is the ideal place to discuss and share ideas and suggestions with other users and developers of Open-IM-Server. You can ask technical questions, seek help, or share your experiences with other users of Open-IM-Server.
|
||||
|
||||
In addition to Slack, we also offer the following ways to get in touch:
|
||||
|
||||
+ <a href="https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg" target="_blank"><img src="https://img.shields.io/badge/slack-%40OpenIMSDKCore-informational?logo=slack&style=flat-square"></a>: We also have Slack channels for you to communicate and discuss. To join, visit https://slack.com/ and join our [👀 Open-IM-Server slack](https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg) team channel.
|
||||
+ <a href="https://mail.google.com/mail/u/0/?fs=1&tf=cm&to=4closetool3@gmail.com" target="_blank"><img src="https://img.shields.io/badge/gmail-%40OOpenIMSDKCore?style=social&logo=gmail"></a>: Get in touch with us on [Gmail](winxu81@gmail.com). If you have any questions or issues that need resolving, or any suggestions and feedback for our open source projects, please feel free to contact us via email.
|
||||
+ <a href="https://doc.rentsoft.cn/" target="_blank"><img src="https://img.shields.io/badge/%E5%8D%9A%E5%AE%A2-%40OpenIMSDKCore-blue?style=social&logo=Octopus%20Deploy"></a>: Read our [blog](https://doc.rentsoft.cn/). Our blog is a great place to stay up-to-date with Open-IM-Server projects and trends. On the blog, we share our latest developments, tech trends, and other interesting information.
|
||||
+ <a href="https://github.com/OpenIMSDK/OpenIM-Docs/blob/main/docs/images/WechatIMG20.jpeg" target="_blank"><img src="https://img.shields.io/badge/%E5%BE%AE%E4%BF%A1-OpenIMSDKCore-brightgreen?logo=wechat&style=flat-square"></a>: Add [Wechat](https://github.com/OpenIMSDK/OpenIM-Docs/blob/main/docs/images/WechatIMG20.jpeg) and indicate that you are a user or developer of Open-IM-Server. We will process your request as soon as possible.
|
||||
|
||||
Whether you're looking to join our community or have any questions or suggestions, we welcome you to get in touch with us.
|
||||
|
||||
+22
-40
@@ -1,49 +1,31 @@
|
||||
# Use Go 1.21 Alpine as the base image for building the application
|
||||
FROM golang:1.21-alpine as builder
|
||||
# Build Stage
|
||||
FROM golang:1.20 AS builder
|
||||
|
||||
# Define the base directory for the application as an environment variable
|
||||
ENV SERVER_DIR=/openim-server
|
||||
# Set go mod installation source and proxy
|
||||
ARG GO111MODULE=on
|
||||
ARG GOPROXY=https://goproxy.cn,direct
|
||||
ENV GO111MODULE=$GO111MODULE
|
||||
ENV GOPROXY=$GOPROXY
|
||||
|
||||
# Set the working directory inside the container based on the environment variable
|
||||
WORKDIR $SERVER_DIR
|
||||
# Set up the working directory
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
# Set the Go proxy to improve dependency resolution speed
|
||||
ENV GOPROXY=https://goproxy.io,direct
|
||||
COPY go.mod go.sum go.work ./
|
||||
#RUN go mod download
|
||||
|
||||
# Copy all files from the current directory into the container
|
||||
COPY . .
|
||||
# Copy all files to the container
|
||||
ADD . .
|
||||
|
||||
RUN go mod download
|
||||
RUN make clean
|
||||
RUN make build
|
||||
|
||||
# Install Mage to use for building the application
|
||||
RUN go install github.com/magefile/mage@v1.15.0
|
||||
FROM ghcr.io/openim-sigs/openim-ubuntu-image:latest
|
||||
|
||||
# Optionally build your application if needed
|
||||
RUN mage build
|
||||
WORKDIR ${SERVER_WORKDIR}
|
||||
|
||||
# Using Alpine Linux with Go environment for the final image
|
||||
FROM golang:1.21-alpine
|
||||
# Copy scripts and binary files to the production image
|
||||
COPY --from=builder ${OPENIM_SERVER_BINDIR} /openim/openim-server/_output/bin
|
||||
COPY --from=builder ${OPENIM_SERVER_CMDDIR} /openim/openim-server/scripts
|
||||
COPY --from=builder ${SERVER_WORKDIR}/config /openim/openim-server/config
|
||||
|
||||
# Install necessary packages, such as bash
|
||||
RUN apk add --no-cache bash
|
||||
|
||||
# Set the environment and work directory
|
||||
ENV SERVER_DIR=/openim-server
|
||||
WORKDIR $SERVER_DIR
|
||||
|
||||
|
||||
# Copy the compiled binaries and mage from the builder image to the final image
|
||||
COPY --from=builder $SERVER_DIR/_output $SERVER_DIR/_output
|
||||
COPY --from=builder $SERVER_DIR/config $SERVER_DIR/config
|
||||
COPY --from=builder /go/bin/mage /usr/local/bin/mage
|
||||
COPY --from=builder $SERVER_DIR/magefile_windows.go $SERVER_DIR/
|
||||
COPY --from=builder $SERVER_DIR/magefile_unix.go $SERVER_DIR/
|
||||
COPY --from=builder $SERVER_DIR/magefile.go $SERVER_DIR/
|
||||
COPY --from=builder $SERVER_DIR/start-config.yml $SERVER_DIR/
|
||||
COPY --from=builder $SERVER_DIR/go.mod $SERVER_DIR/
|
||||
COPY --from=builder $SERVER_DIR/go.sum $SERVER_DIR/
|
||||
|
||||
RUN go get github.com/openimsdk/gomake@v0.0.14-alpha.5
|
||||
|
||||
# Set the command to run when the container starts
|
||||
ENTRYPOINT ["sh", "-c", "mage start && tail -f /dev/null"]
|
||||
CMD ["/openim/openim-server/scripts/docker-start-all.sh"]
|
||||
|
||||
@@ -0,0 +1,236 @@
|
||||
# ==============================================================================
|
||||
# define the default goal
|
||||
#
|
||||
|
||||
.DEFAULT_GOAL := help
|
||||
|
||||
## all: Run tidy, gen, add-copyright, format, lint, cover, build ✨
|
||||
.PHONY: all
|
||||
all: tidy gen add-copyright verify lint cover restart
|
||||
|
||||
# ==============================================================================
|
||||
# Build set
|
||||
|
||||
ROOT_PACKAGE=github.com/OpenIMSDK/Open-IM-Server
|
||||
# TODO: This is version control for the future https://github.com/OpenIMSDK/Open-IM-Server/issues/574
|
||||
VERSION_PACKAGE=github.com/OpenIMSDK/Open-IM-Server/pkg/version
|
||||
|
||||
# ==============================================================================
|
||||
# Includes
|
||||
|
||||
include scripts/make-rules/common.mk # make sure include common.mk at the first include line
|
||||
include scripts/make-rules/golang.mk
|
||||
include scripts/make-rules/image.mk
|
||||
include scripts/make-rules/copyright.mk
|
||||
include scripts/make-rules/gen.mk
|
||||
include scripts/make-rules/dependencies.mk
|
||||
include scripts/make-rules/tools.mk
|
||||
include scripts/make-rules/release.mk
|
||||
include scripts/make-rules/swagger.mk
|
||||
|
||||
# ==============================================================================
|
||||
# Usage
|
||||
|
||||
define USAGE_OPTIONS
|
||||
|
||||
Options:
|
||||
|
||||
DEBUG Whether or not to generate debug symbols. Default is 0.
|
||||
|
||||
BINS Binaries to build. Default is all binaries under cmd.
|
||||
This option is available when using: make {build}(.multiarch)
|
||||
Example: make build BINS="openim-api openim-cmdutils".
|
||||
|
||||
PLATFORMS Platform to build for. Default is linux_arm64 and linux_amd64.
|
||||
This option is available when using: make {build}.multiarch
|
||||
Example: make multiarch PLATFORMS="linux_s390x linux_mips64
|
||||
linux_mips64le darwin_amd64 windows_amd64 linux_amd64 linux_arm64".
|
||||
|
||||
V Set to 1 enable verbose build. Default is 0.
|
||||
endef
|
||||
export USAGE_OPTIONS
|
||||
|
||||
# ==============================================================================
|
||||
# Targets
|
||||
|
||||
## init: Initialize openim server project ✨
|
||||
.PHONY: init
|
||||
init:
|
||||
@$(MAKE) gen.init
|
||||
|
||||
## demo: Run demo get started with Makefiles quickly ✨
|
||||
.PHONY: demo
|
||||
demo:
|
||||
@$(MAKE) go.demo
|
||||
|
||||
## build: Build binaries by default ✨
|
||||
.PHONY: build
|
||||
build:
|
||||
@$(MAKE) go.build
|
||||
|
||||
## start: Start openim ✨
|
||||
.PHONY: start
|
||||
start:
|
||||
@$(MAKE) go.start
|
||||
|
||||
## stop: Stop openim ✨
|
||||
.PHONY: stop
|
||||
stop:
|
||||
@$(MAKE) go.stop
|
||||
|
||||
## restart: Restart openim ✨
|
||||
.PHONY: restart
|
||||
restart: clean stop build init start
|
||||
|
||||
## multiarch: Build binaries for multiple platforms. See option PLATFORMS. ✨
|
||||
.PHONY: multiarch
|
||||
multiarch:
|
||||
@$(MAKE) go.build.multiarch
|
||||
|
||||
## verify: execute all verity scripts. ✨
|
||||
.PHONY: verify
|
||||
verify:
|
||||
@$(MAKE) go.verify
|
||||
|
||||
## install: Install deployment openim ✨
|
||||
.PHONY: install
|
||||
install:
|
||||
@$(MAKE) go.install
|
||||
|
||||
## check: Check OpenIM deployment ✨
|
||||
.PHONY: check
|
||||
check:
|
||||
@$(MAKE) go.check
|
||||
|
||||
## check-component
|
||||
.PHONY: check-component
|
||||
check-component:
|
||||
@$(MAKE) go.check-component
|
||||
|
||||
## tidy: tidy go.mod ✨
|
||||
.PHONY: tidy
|
||||
tidy:
|
||||
@$(GO) mod tidy
|
||||
|
||||
## vendor: vendor go.mod ✨
|
||||
.PHONY: vendor
|
||||
vendor:
|
||||
@$(GO) mod vendor
|
||||
|
||||
## style: code style -> fmt,vet,lint ✨
|
||||
.PHONY: style
|
||||
style: fmt vet lint
|
||||
|
||||
## fmt: Run go fmt against code. ✨
|
||||
.PHONY: fmt
|
||||
fmt:
|
||||
@$(GO) fmt ./...
|
||||
|
||||
## vet: Run go vet against code. ✨
|
||||
.PHONY: vet
|
||||
vet:
|
||||
@$(GO) vet ./...
|
||||
|
||||
## lint: Check syntax and styling of go sources. ✨
|
||||
.PHONY: lint
|
||||
lint:
|
||||
@$(MAKE) go.lint
|
||||
|
||||
## format: Gofmt (reformat) package sources (exclude vendor dir if existed). ✨
|
||||
.PHONY: format
|
||||
format:
|
||||
@$(MAKE) go.format
|
||||
|
||||
## test: Run unit test. ✨
|
||||
.PHONY: test
|
||||
test:
|
||||
@$(MAKE) go.test
|
||||
|
||||
## cover: Run unit test and get test coverage. ✨
|
||||
.PHONY: cover
|
||||
cover:
|
||||
@$(MAKE) go.test.cover
|
||||
|
||||
## updates: Check for updates to go.mod dependencies. ✨
|
||||
.PHONY: updates
|
||||
@$(MAKE) go.updates
|
||||
|
||||
## imports: task to automatically handle import packages in Go files using goimports tool. ✨
|
||||
.PHONY: imports
|
||||
imports:
|
||||
@$(MAKE) go.imports
|
||||
|
||||
## clean: Remove all files that are created by building. ✨
|
||||
.PHONY: clean
|
||||
clean:
|
||||
@$(MAKE) go.clean
|
||||
|
||||
## image: Build docker images for host arch. ✨
|
||||
.PHONY: image
|
||||
image:
|
||||
@$(MAKE) image.build
|
||||
|
||||
## image.multiarch: Build docker images for multiple platforms. See option PLATFORMS. ✨
|
||||
.PHONY: image.multiarch
|
||||
image.multiarch:
|
||||
@$(MAKE) image.build.multiarch
|
||||
|
||||
## push: Build docker images for host arch and push images to registry. ✨
|
||||
.PHONY: push
|
||||
push:
|
||||
@$(MAKE) image.push
|
||||
|
||||
## push.multiarch: Build docker images for multiple platforms and push images to registry. ✨
|
||||
.PHONY: push.multiarch
|
||||
push.multiarch:
|
||||
@$(MAKE) image.push.multiarch
|
||||
|
||||
## tools: Install dependent tools. ✨
|
||||
.PHONY: tools
|
||||
tools:
|
||||
@$(MAKE) tools.install
|
||||
|
||||
## gen: Generate all necessary files. ✨
|
||||
.PHONY: gen
|
||||
gen:
|
||||
@$(MAKE) gen.run
|
||||
|
||||
## swagger: Generate swagger document. ✨
|
||||
.PHONY: swagger
|
||||
swagger:
|
||||
@$(MAKE) swagger.run
|
||||
|
||||
## serve-swagger: Serve swagger spec and docs. ✨
|
||||
.PHONY: swagger.serve
|
||||
serve-swagger:
|
||||
@$(MAKE) swagger.serve
|
||||
|
||||
## verify-copyright: Verify the license headers for all files. ✨
|
||||
.PHONY: verify-copyright
|
||||
verify-copyright:
|
||||
@$(MAKE) copyright.verify
|
||||
|
||||
## add-copyright: Add copyright ensure source code files have license headers. ✨
|
||||
.PHONY: add-copyright
|
||||
add-copyright:
|
||||
@$(MAKE) copyright.add
|
||||
|
||||
## advertise: Project introduction, become a contributor ✨
|
||||
.PHONY: advertise
|
||||
advertise:
|
||||
@$(MAKE) copyright.advertise
|
||||
|
||||
## release: release the project ✨
|
||||
.PHONY: release
|
||||
release: release.verify release.ensure-tag
|
||||
@scripts/release.sh
|
||||
|
||||
## help: Show this help info. ✨
|
||||
.PHONY: help
|
||||
help: Makefile
|
||||
$(call makehelp)
|
||||
|
||||
## help-all: Show all help details info. ✨
|
||||
.PHONY: help-all
|
||||
help-all: go.help copyright.help tools.help image.help dependencies.help gen.help release.help swagger.help help
|
||||
$(call makeallhelp)
|
||||
+357
@@ -0,0 +1,357 @@
|
||||
<p align="center">
|
||||
<a href="https://www.openim.online">
|
||||
<img src="./assets/logo-gif/openim-logo.gif" width="60%" height="30%"/>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<h3 align="center" style="border-bottom: none">
|
||||
⭐️ Open source Instant Messaging Server ⭐️ <br>
|
||||
<h3>
|
||||
|
||||
|
||||
<p align=center>
|
||||
<a href="https://goreportcard.com/report/github.com/OpenIMSDK/Open-IM-Server"><img src="https://goreportcard.com/badge/github.com/OpenIMSDK/Open-IM-Server" alt="A+"></a>
|
||||
<a href="https://github.com/OpenIMSDK/Open-IM-Server/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22good+first+issue%22"><img src="https://img.shields.io/github/issues/OpenIMSDK/Open-IM-Server/good%20first%20issue?logo=%22github%22" alt="good first"></a>
|
||||
<a href="https://github.com/OpenIMSDK/Open-IM-Server"><img src="https://img.shields.io/github/stars/OpenIMSDK/Open-IM-Server.svg?style=flat&logo=github&colorB=deeppink&label=stars"></a>
|
||||
<a href="https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg"><img src="https://img.shields.io/badge/Slack-300%2B-blueviolet?logo=slack&logoColor=white"></a>
|
||||
<a href="https://github.com/OpenIMSDK/Open-IM-Server/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-Apache--2.0-green"></a>
|
||||
<a href="https://golang.org/"><img src="https://img.shields.io/badge/Language-Go-blue.svg"></a>
|
||||
</p>
|
||||
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="./README.md"><b> English </b></a> •
|
||||
<a href="./README-zh_CN.md"><b> 简体中文 </b></a> •
|
||||
<a href="https://www.openim.online/en"><b> Docs </b></a>
|
||||
</p>
|
||||
|
||||
|
||||
</p>
|
||||
|
||||
## ✨ 关于 OpenIM
|
||||
|
||||
Open-IM-Server 是使用纯 Golang 精心制作的强大的即时消息服务器。其通过 JSON over WebSocket 进行通信的独特方法将每次交互都视为消息。这简化了定制并消除了修改服务器代码的需求。通过利用微服务架构,服务器可以通过集群部署,保证出色的性能和可伸缩性。
|
||||
|
||||
Open-IM-Server 不仅仅是一个即时消息服务器;它是将实时网络集成到您的应用程序中的强大工具,定位为您集成的首选选择!🚀
|
||||
|
||||
请注意,Open-IM-Server 不作为独立产品运行,也不提供内置的帐户注册或登录服务。为了简化您的实施过程,我们已开源了 [chat repository](https://github.com/OpenIMSDK/chat),其中包括这些功能。与 Open-IM-Server 一起部署此聊天业务服务器可加快全面的聊天产品的设置。👥
|
||||
|
||||
为了进一步增强您的体验,我们还提供了 SDK 客户端,在其中实现了大多数复杂逻辑。可以在 [此链接](https://github.com/OpenIMSDK/openim-sdk-core) 找到 [SDK repository](https://github.com/OpenIMSDK/openim-sdk-core)。[chat repository](https://github.com/OpenIMSDK/chat) 是我们的业务服务器,而 'core' 代表 SDK 的高级封装,它们协同工作以提供卓越的结果。✨
|
||||
|
||||
## :star2: 为什么选择 OpenIM
|
||||
|
||||
**🔍 功能截图显示**
|
||||
|
||||
<div align="center">
|
||||
|
||||
| 💻🔄📱 多终端同步 🔄🖥️ | 📅⚡ 高效会议 🚀💼 |
|
||||
| :----------------------------------------------------------: | :----------------------------------------------------------: |
|
||||
|  |  |
|
||||
| 📲🔄 **一对一和群聊** 👥🗣️ | 🎁💻 **特殊功能 - 自定义消息** ✉️🎨 |
|
||||
|  |  |
|
||||
|
||||
</div>
|
||||
|
||||
1. **全面的消息类型支持 :speech_balloon:**
|
||||
|
||||
✅ 支持几乎所有类型的消息,包括文本、图片、表情符号、语音、视频、地理位置、文件、报价、名片、系统通知、自定义消息等
|
||||
|
||||
✅ 支持一对一和多人音视频通话
|
||||
|
||||
✅ 为 iOS、Android、Flutter、uni-app、ReactNative、Electron、Web、H5 等多个平台提供终端支持
|
||||
|
||||
2. **随时随地的高效会议 :earth_americas:**
|
||||
|
||||
✅ 基于具有 100% 可靠强制信令功能的 IM (Instant Messaging),为与聊天应用程序深度集成的 IM 系统铺平了道路
|
||||
|
||||
✅ 支持单次会议中的数百人,订阅人数达到数千,以及服务器端音视频录制
|
||||
|
||||
3. **适用于各种社交场景的一对一和群聊 :busts_in_silhouette:**
|
||||
|
||||
✅ OpenIM 有四种角色:应用程序管理员、群主、群管理员和普通成员
|
||||
|
||||
✅ 强大的群特性,如静音、群公告、群验证、无限群成员和根据需要加载群消息
|
||||
|
||||
4. **独特的功能 :star2:**
|
||||
|
||||
✅ 支持读取并烧毁私人聊天,可自定义时长
|
||||
|
||||
✅ 消息编辑功能扩大了社交场景,使即时通讯变得更加多样化和有趣
|
||||
|
||||
5. **开源 :open_hands:**
|
||||
|
||||
✅ OpenIM 的代码是开源的,数据自控,旨在构建一个全球领先的 IM 开源社区,包括客户端 SDK 和服务器
|
||||
|
||||
✅ 基于开源服务器,已经开发了许多出色的开源项目,例如 [OpenKF](https://github.com/OpenIMSDK/OpenKF) (开源 AI 客户服务系统)
|
||||
|
||||
6. **易于扩展 :wrench:**
|
||||
|
||||
✅ OpenIM 服务器是用 Golang 实现的,引入了创新的 "一切都是消息" 通信模型,简化了自定义消息和扩展功能的实现
|
||||
|
||||
7. **高性能 :racing_car:**
|
||||
|
||||
✅ OpenIM 支持集群中的分层治理架构,经过大量用户的测试,并抽象了在线消息、离线消息和历史消息的存储模型
|
||||
|
||||
8. **全平台支持 :tv:**
|
||||
|
||||
✅ 支持原生 iOS、Android;跨平台 Flutter、uni-app、ReactNative;主要的 Web 前端框架如 React、Vue;小程序和 Electron 支持的 PC 平台
|
||||
|
||||
9. **终极部署体验 🤖**
|
||||
|
||||
✅ 支持 [集群部署](https://github.com/OpenIMSDK/Open-IM-Server/edit/main/deployments/README.md)
|
||||
|
||||
✅ 支持多架构镜像,我们的 Docker 镜像不仅托管在 GitHub 上,而且还在阿里云和 Docker Hub 上支持多个架构。请访问 [我们的 GitHub packages](https://github.com/orgs/OpenIMSDK/packages?repo_name=Open-IM-Server) 并阅读我们的 [版本管理文档](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/version.md) 以获取更多信息。
|
||||
|
||||
10. **开源社区的大生态系统 🤲**
|
||||
|
||||
✅ 我们有数万用户和许多解决方案来解决问题。
|
||||
|
||||
✅ 我们有一个大型的开源社区叫 [OpenIMSDK](https://github.com/OpenIMSDK),它运行核心模块,我们还有一个开源社区叫 [openim-sigs](https://github.com/openim-sigs) 以探索更多基于 IM 的基础设施产品。
|
||||
|
||||
## :rocket: 快速开始
|
||||
|
||||
<details> <summary>使用 Docker Compose 部署</summary>
|
||||
|
||||
1. 克隆项目
|
||||
|
||||
```
|
||||
bashCopy code# 选择您需要的
|
||||
BRANCH=release-v3.1
|
||||
git clone -b $BRANCH https://github.com/OpenIMSDK/Open-IM-Server openim && export openim=$(pwd)/openim && cd $openim && make build
|
||||
```
|
||||
|
||||
> **注意** 阅读我们的发布策略:https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/version.md
|
||||
|
||||
1. 修改 `.env`
|
||||
|
||||
```
|
||||
bashCopy codeUSER=root #无需修改
|
||||
PASSWORD=openIM123 #8位或更多数字和字母的组合,此密码适用于redis、mysql、mongo,以及config/config.yaml中的accessSecret
|
||||
ENDPOINT=http://127.0.0.1:10005 #minio的外部服务IP和端口,或使用域名storage.xx.xx,应用程序必须能够访问此IP和端口或域名,
|
||||
API_URL=http://127.0.0.1:10002/object/ #应用程序必须能够访问此IP和端口或域名,
|
||||
DATA_DIR=./ #指定大磁盘目录
|
||||
```
|
||||
|
||||
1. 部署并启动
|
||||
|
||||
> **注意** 此命令只能执行一次。它会基于 `.env` 中的 `PASSWORD` 变量修改 docker-compose 中的组件密码,并修改 `config/config.yaml` 中的组件密码。如果 `.env` 中的密码发生变化,您需要首先执行 `docker-compose down`;`rm components -rf` 然后执行此命令。
|
||||
|
||||
```
|
||||
bashCopy code
|
||||
make install
|
||||
```
|
||||
|
||||
1. 检查服务
|
||||
|
||||
```
|
||||
bashCopy code
|
||||
make check
|
||||
```
|
||||
|
||||

|
||||
|
||||
</details> <details> <summary>从源码编译</summary>
|
||||
|
||||
您需要 `Go 1.18` 或更高版本,以及 `make`。
|
||||
|
||||
版本详情:https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/version.md
|
||||
|
||||
```
|
||||
bashCopy code# 选择您需要的
|
||||
BRANCH=release-v3.1
|
||||
git clone -b $BRANCH https://github.com/OpenIMSDK/Open-IM-Server openim && export openim=$(pwd)/openim && cd $openim && make build
|
||||
```
|
||||
|
||||
阅读关于 [OpenIM 版本策略](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/version.md)
|
||||
|
||||
使用 `make help` 来查看 OpenIM 支持的指令。
|
||||
|
||||
如图所示,所有服务已成功构建
|
||||
|
||||

|
||||
|
||||
</details> <details> <summary>组件配置说明</summary>
|
||||
|
||||
config/config.yaml 文件为存储组件提供了详细的配置说明。
|
||||
|
||||
- Zookeeper
|
||||
|
||||
- 用于 RPC 服务发现和注册,支持集群。
|
||||
|
||||
```
|
||||
bashCopy codezookeeper:
|
||||
schema: openim #不建议修改
|
||||
address: [ 127.0.0.1:2181 ] #地址
|
||||
username: #用户名
|
||||
password: #密码
|
||||
```
|
||||
|
||||
- MySQL
|
||||
|
||||
- 用于存储用户、关系和群组,支持主从数据库。
|
||||
|
||||
```
|
||||
bashCopy codemysql:
|
||||
address: [ 127.0.0.1:13306 ] #地址
|
||||
username: root #用户名
|
||||
password: openIM123 #密码
|
||||
database: openIM_v2 #不建议修改
|
||||
maxOpenConn: 1000 #最大连接
|
||||
maxIdleConn: 100 #最大空闲连接
|
||||
maxLifeTime: 60 #连接可重用的最大时间(秒)
|
||||
logLevel: 4 #日志级别 1=静音 2=错误 3=警告 4=信息
|
||||
slowThreshold: 500 #慢语句阈值(毫秒)
|
||||
```
|
||||
|
||||
- Mongo
|
||||
|
||||
- 用于存储离线消息,支持 mongo 分片集群。
|
||||
|
||||
```
|
||||
bashCopy codemongo:
|
||||
uri: #如果不为空,则直接使用此值
|
||||
address: [ 127.0.0.1:37017 ] #地址
|
||||
database: openIM #默认 mongo 数据库
|
||||
username: root #用户名
|
||||
password: openIM123 #密码
|
||||
maxPoolSize: 100 #最大连接数
|
||||
```
|
||||
|
||||
- Redis
|
||||
|
||||
- 用于存储消息序列号、最新消息、用户令牌和 mysql 缓存,支持集群部署。
|
||||
|
||||
```
|
||||
bashCopy coderedis:
|
||||
address: [ 127.0.0.1:16379 ] #地址
|
||||
username: #用户名
|
||||
password: openIM123 #密码
|
||||
```
|
||||
|
||||
- Kafka
|
||||
|
||||
- 用于消息队列,用于消息解耦,支持集群部署。
|
||||
|
||||
```
|
||||
bashCopy codekafka:
|
||||
username: #用户名
|
||||
password: #密码
|
||||
addr: [ 127.0.0.1:9092 ] #地址
|
||||
latestMsgToRedis:
|
||||
topic: "latestMsgToRedis"
|
||||
offlineMsgToMongo:
|
||||
topic: "offlineMsgToMongoMysql"
|
||||
msgToPush:
|
||||
topic: "msqToPush"
|
||||
msgToModify:
|
||||
topic: "msgToModify"
|
||||
consumerGroupID:
|
||||
msgToRedis: redis
|
||||
msgToMongo: mongo
|
||||
msgToMySql: mysql
|
||||
msgToPush: push
|
||||
msgToModify: modify
|
||||
```
|
||||
|
||||
</details> <details> <summary>启动和停止服务</summary>
|
||||
|
||||
启动服务
|
||||
|
||||
```
|
||||
bashCopy code
|
||||
./scripts/start-all.sh;
|
||||
```
|
||||
|
||||
检查服务
|
||||
|
||||
```
|
||||
bashCopy code
|
||||
./scripts/check-all.sh
|
||||
```
|
||||
|
||||
停止服务
|
||||
|
||||
```
|
||||
bashCopy code
|
||||
./scripts/stop-all.sh
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details> <summary>开放 IM 端口</summary>
|
||||
|
||||
| TCP 端口 | 描述 | 操作 |
|
||||
| --------- | --------------------------------------------------- | --------------------------------------- |
|
||||
| TCP:10001 | ws 协议,消息端口如消息发送、推送等,用于客户端 SDK | 端口释放或 nginx 反向代理,并关闭防火墙 |
|
||||
| TCP:10002 | api 端口,如用户、朋友、组、消息接口。 | 端口释放或 nginx 反向代理,并关闭防火墙 |
|
||||
| TCP:10005 | 选择 minio 存储时所需 (openIM 默认使用 minio 存储) | 端口释放或 nginx 反向代理,并关闭防火墙 |
|
||||
|
||||
</details> <details> <summary>开放聊天端口</summary>
|
||||
|
||||
- 聊天仓库: https://github.com/OpenIMSDK/chat
|
||||
|
||||
| TCP 端口 | 描述 | 操作 |
|
||||
| --------- | ------------------------ | --------------------------------------- |
|
||||
| TCP:10008 | 业务系统,如注册、登录等 | 端口释放或 nginx 反向代理,并关闭防火墙 |
|
||||
| TCP:10009 | 管理后台,如统计、封禁等 | 端口释放或 nginx 反向代理,并关闭防火墙 |
|
||||
|
||||
</details>
|
||||
|
||||
## :link: APP 和 OpenIM 之间的关系
|
||||
|
||||
OpenIM 不仅仅是一个开源的即时消息组件,它是您的应用程序生态系统的一个不可分割的部分。查看此图表以了解 AppServer、AppClient、Open-IM-Server 和 Open-IM-SDK 如何互动。
|
||||
|
||||

|
||||
|
||||
## :building_construction: 总体架构
|
||||
|
||||
深入了解 Open-IM-Server 的功能与我们的架构图。
|
||||
|
||||

|
||||
|
||||
## :hammer_and_wrench: 开始开发 OpenIM
|
||||
|
||||
OpenIM 我们的目标是建立一个顶级的开源社区。我们有一套标准,在 [Community repository](https://github.com/OpenIMSDK/community) 中。
|
||||
|
||||
如果您想为这个 Open-IM-Server 仓库做贡献,请阅读我们的 [贡献者文档](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/CONTRIBUTING.md)。
|
||||
|
||||
在您开始之前,请确保您的更改是需要的。最好的方法是创建一个 [新的讨论](https://github.com/OpenIMSDK/Open-IM-Server/discussions/new/choose) 或 [Slack 通讯](https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg),或者如果您发现一个问题,首先 [报告它](https://github.com/OpenIMSDK/Open-IM-Server/issues/new/choose)。
|
||||
|
||||
- [代码标准](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/go_code.md)
|
||||
- [Docker 图像标准](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/images.md)
|
||||
- [目录标准](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/directory.md)
|
||||
- [提交标准](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/commit.md)
|
||||
- [版本控制标准](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/version.md)
|
||||
- [接口标准](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/api.md)
|
||||
- [日志标准](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/log.md)
|
||||
- [错误代码标准](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/error_code.md)
|
||||
|
||||
## :busts_in_silhouette: 社区
|
||||
|
||||
- 📚 [OpenIM 社区](https://github.com/OpenIMSDK/community)
|
||||
- 💕 [OpenIM 兴趣小组](https://github.com/Openim-sigs)
|
||||
- 🚀 [加入我们的 Slack 社区](https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg)
|
||||
- :eyes: [加入我们的微信群 (微信群)](https://openim-1253691595.cos.ap-nanjing.myqcloud.com/WechatIMG20.jpeg)
|
||||
|
||||
## :calendar: 社区会议
|
||||
|
||||
我们希望任何人都可以参与我们的社区并贡献代码,我们提供礼物和奖励,欢迎您每周四晚上加入我们。
|
||||
|
||||
我们的会议在 [OpenIM Slack](https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg) 🎯,然后您可以搜索 Open-IM-Server 管道加入。
|
||||
|
||||
我们在 [GitHub 讨论](https://github.com/OpenIMSDK/Open-IM-Server/discussions/categories/meeting) 中记下每次 [双周会议](https://github.com/orgs/OpenIMSDK/discussions/categories/meeting) 的笔记,我们的历史会议记录以及会议回放都可在 [Google Docs :bookmark_tabs:](https://docs.google.com/document/d/1nx8MDpuG74NASx081JcCpxPgDITNTpIIos0DS6Vr9GU/edit?usp=sharing) 中找到。
|
||||
|
||||
## :eyes: 谁在使用 OpenIM
|
||||
|
||||
查看我们的 [用户案例研究](https://github.com/OpenIMSDK/community/blob/main/ADOPTERS.md) 页面以获取项目用户列表。不要犹豫,留下一个 [📝评论](https://github.com/OpenIMSDK/Open-IM-Server/issues/379) 并分享您的使用案例。
|
||||
|
||||
## :page_facing_up: 许可证
|
||||
|
||||
OpenIM 根据 Apache 2.0 许可证授权。请查看 [LICENSE](https://github.com/OpenIMSDK/Open-IM-Server/tree/main/LICENSE) 以获取完整的许可证文本。
|
||||
|
||||
OpenIM logo,包括其变体和动画版本,在此存储库 [OpenIM](https://github.com/OpenIMSDK/Open-IM-Server) 下的 [assets/logo](./assets/logo) 和 [assets/logo-gif](./assets/logo-gif) 目录中显示,受版权法保护。
|
||||
|
||||
## 🔮 感谢我们的贡献者!
|
||||
|
||||
<a href="https://github.com/OpenIMSDK/Open-IM-Server/graphs/contributors"> <img src="https://contrib.rocks/image?repo=OpenIMSDK/Open-IM-Server" /> </a>
|
||||
@@ -1,142 +1,392 @@
|
||||
<p align="center">
|
||||
<a href="https://openim.io">
|
||||
<a href="https://www.openim.online">
|
||||
<img src="./assets/logo-gif/openim-logo.gif" width="60%" height="30%"/>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<div align="center">
|
||||
<h3 align="center" style="border-bottom: none">
|
||||
⭐️ Open source Instant Messaging Server ⭐️ <br>
|
||||
<h3>
|
||||
|
||||
[](https://github.com/openimsdk/open-im-server/stargazers)
|
||||
[](https://github.com/openimsdk/open-im-server/network/members)
|
||||
[](https://app.codecov.io/gh/openimsdk/open-im-server)
|
||||
[](https://goreportcard.com/report/github.com/openimsdk/open-im-server)
|
||||
[](https://pkg.go.dev/github.com/openimsdk/open-im-server/v3)
|
||||
[](https://github.com/openimsdk/open-im-server/blob/main/LICENSE)
|
||||
[](https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q)
|
||||
[](https://www.bestpractices.dev/projects/8045)
|
||||
[](https://github.com/openimsdk/open-im-server/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22good+first+issue%22)
|
||||
[](https://golang.org/)
|
||||
|
||||
|
||||
<p align="center">
|
||||
<a href="./README.md">English</a> ·
|
||||
<a href="./README_zh_CN.md">中文</a> ·
|
||||
<a href="./docs/readme/README_uk.md">Українська</a> ·
|
||||
<a href="./docs/readme/README_cs.md">Česky</a> ·
|
||||
<a href="./docs/readme/README_hu.md">Magyar</a> ·
|
||||
<a href="./docs/readme/README_es.md">Español</a> ·
|
||||
<a href="./docs/readme/README_fa.md">فارسی</a> ·
|
||||
<a href="./docs/readme/README_fr.md">Français</a> ·
|
||||
<a href="./docs/readme/README_de.md">Deutsch</a> ·
|
||||
<a href="./docs/readme/README_pl.md">Polski</a> ·
|
||||
<a href="./docs/readme/README_id.md">Indonesian</a> ·
|
||||
<a href="./docs/readme/README_fi.md">Suomi</a> ·
|
||||
<a href="./docs/readme/README_ml.md">മലയാളം</a> ·
|
||||
<a href="./docs/readme/README_ja.md">日本語</a> ·
|
||||
<a href="./docs/readme/README_nl.md">Nederlands</a> ·
|
||||
<a href="./docs/readme/README_it.md">Italiano</a> ·
|
||||
<a href="./docs/readme/README_ru.md">Русский</a> ·
|
||||
<a href="./docs/readme/README_pt_BR.md">Português (Brasil)</a> ·
|
||||
<a href="./docs/readme/README_eo.md">Esperanto</a> ·
|
||||
<a href="./docs/readme/README_ko.md">한국어</a> ·
|
||||
<a href="./docs/readme/README_ar.md">العربي</a> ·
|
||||
<a href="./docs/readme/README_vi.md">Tiếng Việt</a> ·
|
||||
<a href="./docs/readme/README_da.md">Dansk</a> ·
|
||||
<a href="./docs/readme/README_el.md">Ελληνικά</a> ·
|
||||
<a href="./docs/readme/README_tr.md">Türkçe</a>
|
||||
<p align=center>
|
||||
<a href="https://goreportcard.com/report/github.com/OpenIMSDK/Open-IM-Server"><img src="https://goreportcard.com/badge/github.com/OpenIMSDK/Open-IM-Server" alt="A+"></a>
|
||||
<a href="https://github.com/OpenIMSDK/Open-IM-Server/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22good+first+issue%22"><img src="https://img.shields.io/github/issues/OpenIMSDK/Open-IM-Server/good%20first%20issue?logo=%22github%22" alt="good first"></a>
|
||||
<a href="https://github.com/OpenIMSDK/Open-IM-Server"><img src="https://img.shields.io/github/stars/OpenIMSDK/Open-IM-Server.svg?style=flat&logo=github&colorB=deeppink&label=stars"></a>
|
||||
<a href="https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg"><img src="https://img.shields.io/badge/Slack-300%2B-blueviolet?logo=slack&logoColor=white"></a>
|
||||
<a href="https://github.com/OpenIMSDK/Open-IM-Server/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-Apache--2.0-green"></a>
|
||||
<a href="https://golang.org/"><img src="https://img.shields.io/badge/Language-Go-blue.svg"></a>
|
||||
</p>
|
||||
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="./README.md"><b> English </b></a> •
|
||||
<a href="./README-zh_CN.md"><b> 简体中文 </b></a> •
|
||||
<a href="https://www.openim.online/en"><b> Docs </b></a>
|
||||
</p>
|
||||
|
||||
|
||||
</p>
|
||||
|
||||
## ✨ About OpenIM
|
||||
|
||||
Open-IM-Server, meticulously developed in pure Golang, is a powerful instant messaging server. Its distinct communication method, employing pb+websocket, views every interaction as a message, streamlining customization without altering server code. Built on a microservice architecture, it offers deployment through clusters for outstanding performance and scalability.
|
||||
|
||||
Open-IM-Server is more than an instant messaging server; it's a powerful tool for incorporating real-time networking into your applications, positioning itself as your premier choice for integration! 🚀
|
||||
|
||||
Please be aware that Open-IM-Server does not function as a standalone product and does not offer built-in account registration or login services. To ease your implementation process, we've open-sourced the [chat repository](https://github.com/OpenIMSDK/chat), which comprises these features. Deploying this chat business server in conjunction with Open-IM-Server expedites the setup of a comprehensive chat product. 👥
|
||||
|
||||
Further enhancing your experience, we also provide an SDK client, wherein most complex logics are implemented. The [SDK repository](https://github.com/OpenIMSDK/openim-sdk-core) can be found at [this link](https://github.com/OpenIMSDK/openim-sdk-core). The [chat repository](https://github.com/OpenIMSDK/chat) is our business server while the 'core' represents the high-level encapsulation of the SDK, synergistically working together to deliver superior results. ✨
|
||||
|
||||
## :star2: Why OpenIM
|
||||
|
||||
**🔍 Function screenshot display**
|
||||
|
||||
<div align="center">
|
||||
|
||||
| 💻🔄📱 Multi Terminal Synchronization 🔄🖥️ | 📅⚡ Efficient Meetings 🚀💼 |
|
||||
| :----------------------------------------------------------: | :---------------------------------------------------------: |
|
||||
|  |  |
|
||||
| 📲🔄 **One-to-one and Group Chats** 👥🗣️ | 🎁💻 **Special Features - Custom Messages** ✉️🎨|
|
||||
|  |  |
|
||||
|
||||
</div>
|
||||
|
||||
</p>
|
||||
1. **Comprehensive Message Type Support :speech_balloon:**
|
||||
|
||||
## :busts_in_silhouette: Join Our Community
|
||||
✅ Supports almost all types of messages, including text, images, emojis, voice, video, geographical location, files, quotes, business cards, system notifications, custom messages and more
|
||||
|
||||
+ 💬 [Follow us on Twitter](https://twitter.com/founder_im63606)
|
||||
+ 🚀 [Join our Slack](https://join.slack.com/t/openimsdk/shared_invite/zt-2ijy1ys1f-O0aEDCr7ExRZ7mwsHAVg9A)
|
||||
+ :eyes: [Join our WeChat Group](https://openim-1253691595.cos.ap-nanjing.myqcloud.com/WechatIMG20.jpeg)
|
||||
✅ Supports one-on-one and multi-person audio and video calls
|
||||
|
||||
## Ⓜ️ About OpenIM
|
||||
✅ Provides terminal support for multiple platforms such as iOS, Android, Flutter, uni-app, ReactNative, Electron, Web, H5
|
||||
|
||||
Unlike standalone chat applications such as Telegram, Signal, and Rocket.Chat, OpenIM offers an open-source instant messaging solution designed specifically for developers rather than as a directly installable standalone chat app. Comprising OpenIM SDK and OpenIM Server, it provides developers with a complete set of tools and services to integrate instant messaging functions into their applications, including message sending and receiving, user management, and group management. Overall, OpenIM aims to provide developers with the necessary tools and framework to implement efficient instant messaging solutions in their applications.
|
||||
2. **Efficient Meetings Anytime, Anywhere :earth_americas:**
|
||||
|
||||

|
||||
✅ Based on IM (Instant Messaging) with 100% reliable forced signaling capabilities, it paves the way for IM systems, deeply integrated with chat applications
|
||||
|
||||
## 🚀 Introduction to OpenIMSDK
|
||||
✅ Supports hundreds of people in a single meeting, with subscription numbers reaching thousands, and server-side audio and video recording
|
||||
|
||||
**OpenIMSDK**, designed for **OpenIMServer**, is an IM SDK created specifically for integration into client applications. It supports various functionalities and modules:
|
||||
3. **One-on-one and Group Chats for Various Social Scenarios :busts_in_silhouette:**
|
||||
|
||||
+ 🌟 Main Features:
|
||||
- 📦 Local Storage
|
||||
- 🔔 Listener Callbacks
|
||||
- 🛡️ API Wrapping
|
||||
- 🌐 Connection Management
|
||||
✅ OpenIM has four roles: application administrator, group owner, group administrator, and regular member
|
||||
|
||||
+ 📚 Main Modules:
|
||||
1. 🚀 Initialization and Login
|
||||
2. 👤 User Management
|
||||
3. 👫 Friends Management
|
||||
4. 🤖 Group Functions
|
||||
5. 💬 Session Handling
|
||||
✅ Powerful group features such as muting, group announcements, group validation, unlimited group members, and loading group messages as needed
|
||||
|
||||
Built with Golang and supports cross-platform deployment to ensure a consistent integration experience across all platforms.
|
||||
4. **Unique Features :star2:**
|
||||
|
||||
👉 **[Explore the GO SDK](https://github.com/openimsdk/openim-sdk-core)**
|
||||
✅ Supports read-and-burn private chats, customizable duration
|
||||
|
||||
## 🌐 Introduction to OpenIMServer
|
||||
✅ Message editing function broadens social scenarios, making instant communication more diverse and interesting
|
||||
|
||||
+ **OpenIMServer** features include:
|
||||
- 🌐 Microservices Architecture: Supports cluster mode, including a gateway and multiple rpc services.
|
||||
- 🚀 Diverse Deployment Options: Supports source code, Kubernetes, or Docker deployment.
|
||||
- Massive User Support: Supports large-scale groups with hundreds of thousands, millions of users, and billions of messages.
|
||||
5. **Open Source :open_hands:**
|
||||
|
||||
### Enhanced Business Functions:
|
||||
✅ The code of OpenIM is open source, self-controlled data, aimed at building a globally leading IM open source community, including client SDK and server
|
||||
|
||||
+ **REST API**: Provides a REST API for business systems to enhance functionality, such as group creation and message pushing through backend interfaces.
|
||||
✅ Based on open source Server, many excellent open source projects have been developed, such as [OpenKF](https://github.com/OpenIMSDK/OpenKF) (Open source AI customer service system)
|
||||
|
||||
+ **Webhooks**: Expands business forms through callbacks, sending requests to business servers before or after certain events.
|
||||
6. **Easy to Expand :wrench:**
|
||||
|
||||

|
||||
✅ The OpenIM server is implemented in Golang, introducing an innovative "everything is a message" communication model, simplifying the implementation of custom messages and extended features
|
||||
|
||||
7. **High Performance :racing_car:**
|
||||
|
||||
✅ OpenIM supports a hierarchical governance architecture in the cluster, tested by a large number of users, and abstracts the storage model of online messages, offline messages, and historical messages
|
||||
|
||||
8. **Full Platform Support :tv:**
|
||||
|
||||
✅ Supports native iOS, Android; cross-platform Flutter, uni-app, ReactNative; major web front-end frameworks such as React, Vue; applets; and PC platforms supported by Electron
|
||||
|
||||
9. **The ultimate deployment experience 🤖**
|
||||
|
||||
✅ Supports [cluster deployment](https://github.com/OpenIMSDK/Open-IM-Server/edit/main/deployments/README.md)
|
||||
|
||||
✅ Supports multi-architecture mirroring, our Docker images are hosted not only on GitHub but also on Alibaba Cloud and Docker Hub supporting multiple architectures. Visit [our GitHub packages](https://github.com/orgs/OpenIMSDK/packages?repo_name=Open-IM-Server) and read our [version management document](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/version.md) for more information.
|
||||
|
||||
11. **A large ecosystem of open source communities 🤲**
|
||||
|
||||
✅ We have tens of thousands of users and many solutions to problems.
|
||||
|
||||
✅ We have a large open source community called [OpenIMSDK](https://github.com/OpenIMSDK) that runs the core modules, we have an open source community called [openim-sigs](https://github.com/openim-sigs) to explore more IM-based infrastructure products.
|
||||
|
||||
## :rocket: Quick Start
|
||||
|
||||
Experience online for iOS/Android/H5/PC/Web:
|
||||
You can quickly learn OpenIM engineering solutions, all it takes is one simple command:
|
||||
|
||||
👉 **[OpenIM Online Demo](https://www.openim.io/en/commercial)**
|
||||
```bash
|
||||
$ make demo
|
||||
```
|
||||
|
||||
To facilitate user experience, we offer various deployment solutions. You can choose your preferred deployment method from the list below:
|
||||
🤲 In order to facilitate the user experience, we have provided a variety of deployment solutions, you can choose your own deployment method according to the list below:
|
||||
|
||||
+ **[Source Code Deployment Guide](https://docs.openim.io/guides/gettingStarted/imSourceCodeDeployment)**
|
||||
+ **[Docker Deployment Guide](https://docs.openim.io/guides/gettingStarted/dockerCompose)**
|
||||
|
||||
## System Support
|
||||
|
||||
Supports Linux, Windows, Mac systems, and ARM and AMD CPU architectures.
|
||||
|
||||
## :link: Links
|
||||
|
||||
+ **[Developer Manual](https://docs.openim.io/)**
|
||||
+ **[Changelog](https://github.com/openimsdk/open-im-server/blob/main/CHANGELOG.md)**
|
||||
|
||||
## :writing_hand: How to Contribute
|
||||
|
||||
We welcome contributions of any kind! Please make sure to read our [Contributor Documentation](https://github.com/openimsdk/open-im-server/blob/main/CONTRIBUTING.md) before submitting a Pull Request.
|
||||
|
||||
+ **[Report a Bug](https://github.com/openimsdk/open-im-server/issues/new?assignees=&labels=bug&template=bug_report.md&title=)**
|
||||
+ **[Suggest a Feature](https://github.com/openimsdk/open-im-server/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=)**
|
||||
+ **[Submit a Pull Request](https://github.com/openimsdk/open-im-server/pulls)**
|
||||
|
||||
Thank you for contributing to building a powerful instant messaging solution!
|
||||
|
||||
## :closed_book: License
|
||||
|
||||
OpenIMSDK is available under the Apache License 2.0. See the [LICENSE file](https://github.com/openimsdk/open-im-server/blob/main/LICENSE) for more information.
|
||||
<details> <summary>Deploying with Docker Compose</summary>
|
||||
|
||||
|
||||
> docker compose will not be maintained in future versions, but it is still the easiest and most convenient way to organize docker compose deployments into a separate project https://github.com/openim-sigs/openim-docker to maintain.
|
||||
|
||||
**1. Clone the project**
|
||||
|
||||
|
||||
```bash
|
||||
# choose what you need, We take branch 3.2 as an example
|
||||
$ BRANCH=release-v3.2
|
||||
$ git clone -b $BRANCH https://github.com/OpenIMSDK/Open-IM-Server openim/openim-server && export openim_dir=$(pwd)/openim && cd ${openim_dir}/openim-server
|
||||
```
|
||||
|
||||
> **Note**
|
||||
> If you don't know OpenIM's versioning policy, 📚Read our release policy: https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/version.md
|
||||
|
||||
|
||||
|
||||
**2. Configure the config file**
|
||||
|
||||
If you tried to get started quickly with `make demo`, then you know that our config file is generated by automation.
|
||||
|
||||
You can use `make init` to quickly initialize a configuration file
|
||||
|
||||
```bash
|
||||
$ make init
|
||||
$ git diff
|
||||
```
|
||||
|
||||
Then feel free to modify your current config file, you can also modify `/scripts/install/environment.sh` document template, `make init` is essentially rendering `environment.sh` template, and then through the `make init` to automatically generate a new configuration.
|
||||
|
||||
If you only need to change the config file for a short time, or if you don't want to make any major changes in the future, you can modify the `.env file directly
|
||||
|
||||
```bash
|
||||
USER=root #no need to modify
|
||||
PASSWORD=openIM123 #A combination of 8 or more numbers and letters, this password applies to redis, mysql, mongo, as well as accessSecret in config/config.yaml
|
||||
ENDPOINT=http://127.0.0.1:10005 #minio's external service IP and port, or use the domain name storage.xx.xx, the app must be able to access this IP and port or domain,
|
||||
API_URL=http://127.0.0.1:10002/object/ #the app must be able to access this IP and port or domain,
|
||||
DATA_DIR=./ #designate large disk directory
|
||||
```
|
||||
|
||||
**3. Deploy and start**
|
||||
|
||||
> **Note**
|
||||
>
|
||||
> You can deploy either directly with `make install` or with `docker compose up`, the logic is the same
|
||||
|
||||
```bash
|
||||
$ make install
|
||||
# OR
|
||||
$ docker-compose up
|
||||
```
|
||||
|
||||
4. Check the service
|
||||
|
||||
```bash
|
||||
$ make check
|
||||
```
|
||||
|
||||
Looking at the command line at this point, there are two items in the output, checking for the start of the component port that OpenIM depends on, and the start of the OpenIM core component
|
||||
|
||||
</details>
|
||||
|
||||
<details> <summary>Compile from Source</summary>
|
||||
|
||||
|
||||
Ur need `Go 1.18` or higher version, and `make`.
|
||||
|
||||
|
||||
```bash
|
||||
go version && make --version || echo "Error: One of the commands failed."
|
||||
```
|
||||
|
||||
Version Details: https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/version.md
|
||||
|
||||
```bash
|
||||
# choose what you need
|
||||
$ BRANCH=release-v3.1
|
||||
$ git clone -b $BRANCH https://github.com/OpenIMSDK/Open-IM-Server openim && export openim=$(pwd)/openim && cd $openim && make start
|
||||
```
|
||||
|
||||
> `make help` to help you see the instructions supported by OpenIM.
|
||||
|
||||
Use `make check` to check all component starts
|
||||
|
||||
```bash
|
||||
$ make check
|
||||
```
|
||||
|
||||
You can use the `make help-all` see OpenIM in action.
|
||||
|
||||
</details>
|
||||
|
||||
<details> <summary>Component Configuration Instructions</summary>
|
||||
The `config/config.yaml` file has detailed configuration instructions for the storage components.
|
||||
|
||||
|
||||
The config file is available via [environment.sh](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/scripts/install/environment.sh) configuration [openim.yaml](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/deployments/templates/openim.yaml) template, and then through the `make init` to automatically generate a new configuration.
|
||||
|
||||
- Zookeeper
|
||||
|
||||
- Used for RPC service discovery and registration, cluster support.
|
||||
|
||||
```bash
|
||||
zookeeper:
|
||||
schema: openim #Not recommended to modify
|
||||
address: [ 127.0.0.1:2181 ] #address
|
||||
username: #username
|
||||
password: #password
|
||||
```
|
||||
|
||||
- MySQL
|
||||
|
||||
- Used for storing users, relationships, and groups, supports master-slave database.
|
||||
|
||||
```bash
|
||||
mysql:
|
||||
address: [ 127.0.0.1:13306 ] #address
|
||||
username: root #username
|
||||
password: openIM123 #password
|
||||
database: openIM_v2 #Not recommended to modify
|
||||
maxOpenConn: 1000 #maximum connection
|
||||
maxIdleConn: 100 #maximum idle connection
|
||||
maxLifeTime: 60 #maximum time a connection can be reused (seconds)
|
||||
logLevel: 4 #log level 1=slient 2=error 3=warn 4=info
|
||||
slowThreshold: 500 #slow statement threshold (milliseconds)
|
||||
```
|
||||
|
||||
- Mongo
|
||||
|
||||
- Used for storing offline messages, supports mongo sharded clusters.
|
||||
|
||||
```bash
|
||||
mongo:
|
||||
uri: #Use this value directly if not empty
|
||||
address: [ 127.0.0.1:37017 ] #address
|
||||
database: openIM #default mongo db
|
||||
username: root #username
|
||||
password: openIM123 #password
|
||||
maxPoolSize: 100 #maximum connections
|
||||
```
|
||||
|
||||
- Redis
|
||||
|
||||
- Used for storing message sequence numbers, latest messages, user tokens, and mysql cache, supports cluster deployment.
|
||||
|
||||
```bash
|
||||
redis:
|
||||
address: [ 127.0.0.1:16379 ] #address
|
||||
username: #username
|
||||
password: openIM123 #password
|
||||
```
|
||||
|
||||
- Kafka
|
||||
|
||||
- Used for message queues, for message decoupling, supports cluster deployment.
|
||||
|
||||
```bash
|
||||
kafka:
|
||||
username: #username
|
||||
password: #password
|
||||
addr: [ 127.0.0.1:9092 ] #address
|
||||
latestMsgToRedis:
|
||||
topic: "latestMsgToRedis"
|
||||
offlineMsgToMongo:
|
||||
topic: "offlineMsgToMongoMysql"
|
||||
msgToPush:
|
||||
topic: "msqToPush"
|
||||
msgToModify:
|
||||
topic: "msgToModify"
|
||||
consumerGroupID:
|
||||
msgToRedis: redis
|
||||
msgToMongo: mongo
|
||||
msgToMySql: mysql
|
||||
msgToPush: push
|
||||
msgToModify: modify
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details> <summary>Deployed with kubernetes</summary>
|
||||
|
||||
|
||||
read: https://github.com/OpenIMSDK/Open-IM-Server/blob/main/deployments/README.md
|
||||
|
||||
</details>
|
||||
|
||||
<details> <summary>Open IM Ports</summary>
|
||||
|
||||
|
||||
| TCP Port | Description | Operation |
|
||||
| --------- | ------------------------------------------------------------ | ----------------------------------------------------- |
|
||||
| TCP:10001 | ws protocol, message port such as message sending, pushing etc, used for client SDK | Port release or nginx reverse proxy, and firewall off |
|
||||
| TCP:10002 | api port, such as user, friend, group, message interfaces. | Port release or nginx reverse proxy, and firewall off |
|
||||
| TCP:10005 | Required when choosing minio storage (openIM uses minio storage by default) | Port release or nginx reverse proxy, and firewall off |
|
||||
|
||||
</details>
|
||||
|
||||
<details> <summary>Open Chat Ports</summary>
|
||||
|
||||
|
||||
+ chat warehouse: https://github.com/OpenIMSDK/chat
|
||||
|
||||
| TCP Port | Description | Operation |
|
||||
| --------- | --------------------------------------------------- | ----------------------------------------------------- |
|
||||
| TCP:10008 | Business system, such as registration, login etc | Port release or nginx reverse proxy, and firewall off |
|
||||
| TCP:10009 | Management backend, such as statistics, banning etc | Port release or nginx reverse proxy, and firewall off |
|
||||
|
||||
</details>
|
||||
|
||||
|
||||
## :link: Relationship Between APP and OpenIM
|
||||
|
||||
OpenIM isn't just an open-source instant messaging component, it's an integral part of your application ecosystem. Check out this diagram to understand how AppServer, AppClient, Open-IM-Server, and Open-IM-SDK interact.
|
||||
|
||||

|
||||
|
||||
## :building_construction: Overall Architecture
|
||||
|
||||
Delve into the heart of Open-IM-Server's functionality with our architecture diagram.
|
||||
|
||||

|
||||
|
||||
## :hammer_and_wrench: To start developing OpenIM
|
||||
|
||||
OpenIM Our goal is to build a top-level open source community. We have a set of standards, in the [Community repository](https://github.com/OpenIMSDK/community).
|
||||
|
||||
If you'd like to contribute to this Open-IM-Server repository, please read our [contributor documentation](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/CONTRIBUTING.md).
|
||||
|
||||
Before you start, please make sure your changes are in demand. The best for that is to create a [new discussion](https://github.com/OpenIMSDK/Open-IM-Server/discussions/new/choose) OR [Slack Communication](https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg), or if you find an issue, [report it](https://github.com/OpenIMSDK/Open-IM-Server/issues/new/choose) first.
|
||||
|
||||
- [Code Standards](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/go_code.md)
|
||||
- [Docker Images Standards](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/images.md)
|
||||
- [Directory Standards](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/directory.md)
|
||||
- [Commit Standards](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/commit.md)
|
||||
- [Versioning Standards](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/version.md)
|
||||
- [Interface Standards](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/api.md)
|
||||
- [Log Standards](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/log.md)
|
||||
- [Error Code Standards](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/error_code.md)
|
||||
|
||||
## :busts_in_silhouette: Community
|
||||
|
||||
+ 📚 [OpenIM Community](https://github.com/OpenIMSDK/community)
|
||||
+ 💕 [OpenIM Interest Group](https://github.com/Openim-sigs)
|
||||
+ 🚀 [Join our Slack community](https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg)
|
||||
+ :eyes: [Join our wechat (微信群)](https://openim-1253691595.cos.ap-nanjing.myqcloud.com/WechatIMG20.jpeg)
|
||||
|
||||
## :calendar: Community Meetings
|
||||
|
||||
We want anyone to get involved in our community and contributing code, we offer gifts and rewards, and we welcome you to join us every Thursday night.
|
||||
|
||||
Our conference is in the [OpenIM Slack](https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg) 🎯, then you can search the Open-IM-Server pipeline to join
|
||||
|
||||
We take notes of each [biweekly meeting](https://github.com/orgs/OpenIMSDK/discussions/categories/meeting) in [GitHub discussions](https://github.com/OpenIMSDK/Open-IM-Server/discussions/categories/meeting), Our historical meeting notes, as well as replays of the meetings are available at [Google Docs :bookmark_tabs:](https://docs.google.com/document/d/1nx8MDpuG74NASx081JcCpxPgDITNTpIIos0DS6Vr9GU/edit?usp=sharing).
|
||||
|
||||
## :eyes: Who are using OpenIM
|
||||
|
||||
Check out our [user case studies](https://github.com/OpenIMSDK/community/blob/main/ADOPTERS.md) page for a list of the project users. Don't hesitate to leave a [📝comment](https://github.com/OpenIMSDK/Open-IM-Server/issues/379) and share your use case.
|
||||
|
||||
## :page_facing_up: License
|
||||
|
||||
OpenIM is licensed under the Apache 2.0 license. See [LICENSE](https://github.com/OpenIMSDK/Open-IM-Server/tree/main/LICENSE) for the full license text.
|
||||
|
||||
The OpenIM logo, including its variations and animated versions, displayed in this repository [OpenIM](https://github.com/OpenIMSDK/Open-IM-Server) under the [assets/logo](./assets/logo) and [assets/logo-gif](assets/logo-gif) directories, are protected by copyright laws.
|
||||
|
||||
## 🔮 Thanks to our contributors!
|
||||
|
||||
<a href="https://github.com/openimsdk/open-im-server/graphs/contributors">
|
||||
<img src="https://contrib.rocks/image?repo=openimsdk/open-im-server" />
|
||||
<a href="https://github.com/OpenIMSDK/Open-IM-Server/graphs/contributors">
|
||||
<img src="https://contrib.rocks/image?repo=OpenIMSDK/Open-IM-Server" />
|
||||
</a>
|
||||
|
||||
-142
@@ -1,142 +0,0 @@
|
||||
<p align="center">
|
||||
<a href="https://openim.io">
|
||||
<img src="./assets/logo-gif/openim-logo.gif" width="60%" height="30%"/>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<div align="center">
|
||||
|
||||
[](https://github.com/openimsdk/open-im-server/stargazers)
|
||||
[](https://github.com/openimsdk/open-im-server/network/members)
|
||||
[](https://app.codecov.io/gh/openimsdk/open-im-server)
|
||||
[](https://goreportcard.com/report/github.com/openimsdk/open-im-server)
|
||||
[](https://pkg.go.dev/github.com/openimsdk/open-im-server/v3)
|
||||
[](https://github.com/openimsdk/open-im-server/blob/main/LICENSE)
|
||||
[](https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q)
|
||||
[](https://www.bestpractices.dev/projects/8045)
|
||||
[](https://github.com/openimsdk/open-im-server/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22good+first+issue%22)
|
||||
[](https://golang.org/)
|
||||
|
||||
|
||||
<p align="center">
|
||||
<a href="./README.md">English</a> ·
|
||||
<a href="./README_zh_CN.md">中文</a> ·
|
||||
<a href="./docs/readme/README_uk.md">Українська</a> ·
|
||||
<a href="./docs/readme/README_cs.md">Česky</a> ·
|
||||
<a href="./docs/readme/README_hu.md">Magyar</a> ·
|
||||
<a href="./docs/readme/README_es.md">Español</a> ·
|
||||
<a href="./docs/readme/README_fa.md">فارسی</a> ·
|
||||
<a href="./docs/readme/README_fr.md">Français</a> ·
|
||||
<a href="./docs/readme/README_de.md">Deutsch</a> ·
|
||||
<a href="./docs/readme/README_pl.md">Polski</a> ·
|
||||
<a href="./docs/readme/README_id.md">Indonesian</a> ·
|
||||
<a href="./docs/readme/README_fi.md">Suomi</a> ·
|
||||
<a href="./docs/readme/README_ml.md">മലയാളം</a> ·
|
||||
<a href="./docs/readme/README_ja.md">日本語</a> ·
|
||||
<a href="./docs/readme/README_nl.md">Nederlands</a> ·
|
||||
<a href="./docs/readme/README_it.md">Italiano</a> ·
|
||||
<a href="./docs/readme/README_ru.md">Русский</a> ·
|
||||
<a href="./docs/readme/README_pt_BR.md">Português (Brasil)</a> ·
|
||||
<a href="./docs/readme/README_eo.md">Esperanto</a> ·
|
||||
<a href="./docs/readme/README_ko.md">한국어</a> ·
|
||||
<a href="./docs/readme/README_ar.md">العربي</a> ·
|
||||
<a href="./docs/readme/README_vi.md">Tiếng Việt</a> ·
|
||||
<a href="./docs/readme/README_da.md">Dansk</a> ·
|
||||
<a href="./docs/readme/README_el.md">Ελληνικά</a> ·
|
||||
<a href="./docs/readme/README_tr.md">Türkçe</a>
|
||||
</p>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</p>
|
||||
|
||||
## :busts_in_silhouette: 加入我们的社区
|
||||
|
||||
+ 💬 [关注我们的 Twitter](https://twitter.com/founder_im63606)
|
||||
+ 🚀 [加入我们的 Slack](https://join.slack.com/t/openimsdk/shared_invite/zt-2hljfom5u-9ZuzP3NfEKW~BJKbpLm0Hw)
|
||||
+ :eyes: [加入我们的微信群](https://openim-1253691595.cos.ap-nanjing.myqcloud.com/WechatIMG20.jpeg)
|
||||
|
||||
## Ⓜ️ 关于 OpenIM
|
||||
|
||||
与Telegram、Signal、Rocket.Chat等独立聊天应用不同,OpenIM提供了专为开发者设计的开源即时通讯解决方案,而不是直接安装使用的独立聊天应用。OpenIM由OpenIM SDK和OpenIM Server两大部分组成,为开发者提供了一整套集成即时通讯功能的工具和服务,包括消息发送接收、用户管理和群组管理等。总体来说,OpenIM旨在为开发者提供必要的工具和框架,帮助他们在自己的应用中实现高效的即时通讯解决方案。
|
||||
|
||||

|
||||
|
||||
## 🚀 OpenIMSDK 介绍
|
||||
|
||||
**OpenIMSDK** 是为 **OpenIMServer** 设计的IM SDK,专为集成到客户端应用而生。它支持多种功能和模块:
|
||||
|
||||
+ 🌟 主要功能:
|
||||
- 📦 本地存储
|
||||
- 🔔 监听器回调
|
||||
- 🛡️ API封装
|
||||
- 🌐 连接管理
|
||||
|
||||
+ 📚 主要模块:
|
||||
1. 🚀 初始化及登录
|
||||
2. 👤 用户管理
|
||||
3. 👫 好友管理
|
||||
4. 🤖 群组功能
|
||||
5. 💬 会话处理
|
||||
|
||||
它使用 Golang 构建,并支持跨平台部署,确保在所有平台上提供一致的接入体验。
|
||||
|
||||
👉 **[探索 GO SDK](https://github.com/openimsdk/openim-sdk-core)**
|
||||
|
||||
## 🌐 OpenIMServer 介绍
|
||||
|
||||
+ **OpenIMServer** 的特点包括:
|
||||
- 🌐 微服务架构:支持集群模式,包括网关(gateway)和多个rpc服务。
|
||||
- 🚀 多样的部署方式:支持源代码、Kubernetes或Docker部署。
|
||||
- 海量用户支持:支持十万级超大群组,千万级用户和百亿级消息。
|
||||
|
||||
### 增强的业务功能:
|
||||
|
||||
+ **REST API**:为业务系统提供REST API,增加群组创建、消息推送等后台接口功能。
|
||||
|
||||
+ **Webhooks**:通过事件前后的回调,向业务服务器发送请求,扩展更多的业务形态。
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
## :rocket: 快速入门
|
||||
|
||||
在线体验iOS/Android/H5/PC/Web:
|
||||
|
||||
👉 **[OpenIM在线演示](https://www.openim.io/en/commercial)**
|
||||
|
||||
为了便于用户体验,我们提供了多种部署解决方案,您可以根据以下列表选择适合您的部署方式:
|
||||
|
||||
+ **[源代码部署指南](https://docs.openim.io/guides/gettingStarted/imSourceCodeDeployment)**
|
||||
+ **[Docker 部署指南](https://docs.openim.io/guides/gettingStarted/dockerCompose)**
|
||||
|
||||
## 系统支持
|
||||
|
||||
支持 Linux、Windows、Mac 系统以及 ARM 和 AMD CPU 架构。
|
||||
|
||||
## :link: 相关链接
|
||||
|
||||
+ **[开发手册](https://docs.openim.io/)**
|
||||
+ **[更新日志](https://github.com/openimsdk/open-im-server/blob/main/CHANGELOG.md)**
|
||||
|
||||
## :writing_hand: 如何贡献
|
||||
|
||||
我们欢迎任何形式的贡献!在提交 Pull Request 之前,请确保阅读我们的[贡献者文档](https://github.com/openimsdk/open-im-server/blob/main/CONTRIBUTING.md)
|
||||
|
||||
+ **[报告 Bug](https://github.com/openimsdk/open-im-server/issues/new?assignees=&labels=bug&template=bug_report.md&title=)**
|
||||
+ **[提出新特性](https://github.com/openimsdk/open-im-server/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=)**
|
||||
+ **[提交 Pull Request](https://github.com/openimsdk/open-im-server/pulls)**
|
||||
|
||||
感谢您的贡献,一起来打造强大的即时通讯解决方案!
|
||||
|
||||
## :closed_book: 许可证
|
||||
|
||||
OpenIMSDK 在 Apache License 2.0 许可下可用。查看[LICENSE 文件](https://github.com/openimsdk/open-im-server/blob/main/LICENSE)了解更多信息。
|
||||
|
||||
## 🔮 Thanks to our contributors!
|
||||
|
||||
<a href="https://github.com/openimsdk/open-im-server/graphs/contributors">
|
||||
<img src="https://contrib.rocks/image?repo=openimsdk/open-im-server" />
|
||||
</a>
|
||||
+1
-1
@@ -25,7 +25,7 @@ assets/
|
||||
|
||||
## Copyright Notice:
|
||||
|
||||
The OpenIM logo, including its variations and animated versions, displayed in this repository [OpenIM](https://github.com/openimsdk/open-im-server) under the `/assets/logo` and `/assets/logo-gif` directories, are protected by copyright laws.
|
||||
The OpenIM logo, including its variations and animated versions, displayed in this repository [OpenIM](https://github.com/OpenIMSDK/openim) under the `/assets/logo` and `/assets/logo-gif` directories, are protected by copyright laws.
|
||||
|
||||
The logo design is credited to @Xx(席欣).
|
||||
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
# Official Colors
|
||||
|
||||
The openim logo has an official blue color. When reproducing the logo, please use the official color, when possible.
|
||||
|
||||
## Pantone
|
||||
|
||||
When possible, the Pantone color is preferred for print material. The official Pantone color is *285C*.
|
||||
|
||||
## RGB
|
||||
|
||||
When used digitally, the official RGB color code is *#326CE5*.
|
||||
@@ -1,31 +0,0 @@
|
||||
@echo off
|
||||
SETLOCAL
|
||||
|
||||
mage -version >nul 2>&1
|
||||
IF %ERRORLEVEL% EQU 0 (
|
||||
echo Mage is already installed.
|
||||
GOTO DOWNLOAD
|
||||
)
|
||||
|
||||
go version >nul 2>&1
|
||||
IF NOT %ERRORLEVEL% EQU 0 (
|
||||
echo Go is not installed. Please install Go and try again.
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo Installing Mage...
|
||||
go install github.com/magefile/mage@latest
|
||||
|
||||
mage -version >nul 2>&1
|
||||
IF NOT %ERRORLEVEL% EQU 0 (
|
||||
echo Mage installation failed.
|
||||
echo Please ensure that %GOPATH%/bin is in your PATH.
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo Mage installed successfully.
|
||||
|
||||
:DOWNLOAD
|
||||
go mod download
|
||||
|
||||
ENDLOCAL
|
||||
@@ -1,23 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ ":$PATH:" == *":$HOME/.local/bin:"* ]]; then
|
||||
TARGET_DIR="$HOME/.local/bin"
|
||||
else
|
||||
TARGET_DIR="/usr/local/bin"
|
||||
echo "Using /usr/local/bin as the installation directory. Might require sudo permissions."
|
||||
fi
|
||||
|
||||
if ! command -v mage &> /dev/null; then
|
||||
echo "Installing Mage to $TARGET_DIR ..."
|
||||
GOBIN=$TARGET_DIR go install github.com/magefile/mage@latest
|
||||
fi
|
||||
|
||||
if ! command -v mage &> /dev/null; then
|
||||
echo "Mage installation failed."
|
||||
echo "Please ensure that $TARGET_DIR is in your \$PATH."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Mage installed successfully."
|
||||
|
||||
go mod download
|
||||
+4
-4
@@ -49,17 +49,17 @@ While it is possible to build OpenIM using a local golang installation, we have
|
||||
|
||||
## Basic Flow
|
||||
|
||||
The scripts directly under [`build/`](.) are used to build and test. They will ensure that the `openim-build` Docker image is built (based on [`build/build-image/Dockerfile`](../Dockerfile) and after base image's `OPENIM_BUILD_IMAGE_CROSS_TAG` from Dockerfile is replaced with one of those actual tags of the base image, like `v1.13.9-2`) and then execute the appropriate command in that container. These scripts will both ensure that the right data is cached from run to run for incremental builds and will copy the results back out of the container. You can specify a different registry/name and version for `openim-cross` by setting `OPENIM_CROSS_IMAGE` and `OPENIM_CROSS_VERSION`, see [`common.sh`](common.sh) for more details.
|
||||
The scripts directly under [`build/`](.) are used to build and test. They will ensure that the `kube-build` Docker image is built (based on [`build/build-image/Dockerfile`](build-image/Dockerfile) and after base image's `KUBE_BUILD_IMAGE_CROSS_TAG` from Dockerfile is replaced with one of those actual tags of the base image, like `v1.13.9-2`) and then execute the appropriate command in that container. These scripts will both ensure that the right data is cached from run to run for incremental builds and will copy the results back out of the container. You can specify a different registry/name and version for `kube-cross` by setting `KUBE_CROSS_IMAGE` and `KUBE_CROSS_VERSION`, see [`common.sh`](common.sh) for more details.
|
||||
|
||||
The `openim-build` container image is built by first creating a "context" directory in `_output/images/build-image`. It is done there instead of at the root of the OpenIM repo to minimize the amount of data we need to package up when building the image.
|
||||
The `kube-build` container image is built by first creating a "context" directory in `_output/images/build-image`. It is done there instead of at the root of the OpenIM repo to minimize the amount of data we need to package up when building the image.
|
||||
|
||||
There are 3 different containers instances that are run from this image. The first is a "data" container to store all data that needs to persist across to support incremental builds. Next there is an "rsync" container that is used to transfer data in and out to the data container. Lastly there is a "build" container that is used for actually doing build actions. The data container persists across runs while the rsync and build containers are deleted after each use.
|
||||
|
||||
`rsync` is used transparently behind the scenes to efficiently move data in and out of the container. This will use an ephemeral port picked by Docker. You can modify this by setting the `OPENIM_RSYNC_PORT` env variable.
|
||||
`rsync` is used transparently behind the scenes to efficiently move data in and out of the container. This will use an ephemeral port picked by Docker. You can modify this by setting the `KUBE_RSYNC_PORT` env variable.
|
||||
|
||||
All Docker names are suffixed with a hash derived from the file path (to allow concurrent usage on things like CI machines) and a version number. When the version number changes all state is cleared and clean build is started. This allows the build infrastructure to be changed and signal to CI systems that old artifacts need to be deleted.
|
||||
|
||||
## Build artifacts
|
||||
The build system output all its products to a top level directory in the source repository named `_output`.
|
||||
These include the binary compiled packages (e.g. imctl, openim-api etc.) and archived Docker images.
|
||||
These include the binary compiled packages (e.g. kubectl, kube-scheduler etc.) and archived Docker images.
|
||||
If you intend to run a component with a docker image you will need to import it from this directory with
|
||||
|
||||
+11
-51
@@ -3,36 +3,12 @@
|
||||
|
||||
before:
|
||||
hooks:
|
||||
- make clean
|
||||
# You may remove this if you don't use go modules.
|
||||
- make tidy
|
||||
- make copyright.add
|
||||
# you may remove this if you don't need go generate
|
||||
- go generate ./...
|
||||
|
||||
git:
|
||||
# What should be used to sort tags when gathering the current and previous
|
||||
# tags if there are more than one tag in the same commit.
|
||||
#
|
||||
# Default: '-version:refname'
|
||||
tag_sort: -version:creatordate
|
||||
|
||||
# What should be used to specify prerelease suffix while sorting tags when gathering
|
||||
# the current and previous tags if there are more than one tag in the same commit.
|
||||
#
|
||||
# Since: v1.17
|
||||
prerelease_suffix: "-"
|
||||
|
||||
# Tags to be ignored by GoReleaser.
|
||||
# This means that GoReleaser will not pick up tags that match any of the
|
||||
# provided values as either previous or current tags.
|
||||
#
|
||||
# Templates: allowed.
|
||||
# Since: v1.21.
|
||||
ignore_tags:
|
||||
- nightly
|
||||
# - "{{.Env.IGNORE_TAG}}"
|
||||
|
||||
snapshot:
|
||||
name_template: "{{ incpatch .Version }}-next"
|
||||
|
||||
@@ -279,9 +255,6 @@ builds:
|
||||
- "6"
|
||||
- "7"
|
||||
|
||||
|
||||
# TODO:Need a script, such as the init - release to help binary to find the right directory
|
||||
# ,which can be compiled binary
|
||||
archives:
|
||||
- format: tar.gz
|
||||
# this name template makes the OS and Arch compatible with the results of uname.
|
||||
@@ -292,23 +265,12 @@ archives:
|
||||
{{- else if eq .Arch "386" }}i386
|
||||
{{- else }}{{ .Arch }}{{ end }}
|
||||
{{- if .Arm }}v{{ .Arm }}{{ end }}
|
||||
|
||||
# Set this to true if you want all files in the archive to be in a single directory.
|
||||
# If set to true and you extract the archive 'goreleaser_Linux_arm64.tar.gz',
|
||||
# you'll get a folder 'goreleaser_Linux_arm64'.
|
||||
# If set to false, all files are extracted separately.
|
||||
# You can also set it to a custom folder name (templating is supported).
|
||||
wrap_in_directory: true
|
||||
|
||||
# use zip for windows archives
|
||||
files:
|
||||
- LICENSE
|
||||
- README.md
|
||||
- CHANGELOG/*
|
||||
- deployment/*
|
||||
- config/*
|
||||
- build/*
|
||||
- scripts/*
|
||||
- Makefile
|
||||
- install.sh
|
||||
- CONTRIBUTING.md
|
||||
- docs/*
|
||||
- src: "*.md"
|
||||
dst: docs
|
||||
@@ -377,14 +339,12 @@ changelog:
|
||||
# - image_templates:
|
||||
# - "openimsdk/open-im-server:{{ .Tag }}-amd64"
|
||||
# - "ghcr.io/goreleaser/goreleaser:{{ .Tag }}-amd64"
|
||||
# dockerfile: build/images/openim-api/Dockerfile.release
|
||||
# ids:
|
||||
# - openim-api
|
||||
# dockerfile: Dockerfile
|
||||
# use: buildx
|
||||
# build_flag_templates:
|
||||
# - "--pull"
|
||||
# - "--label=io.artifacthub.package.readme-url=https://raw.githubusercontent.com/openimsdk/open-im-server/main/README.md"
|
||||
# - "--label=io.artifacthub.package.logo-url=hhttps://github.com/openimsdk/open-im-server/blob/main/assets/logo/openim-logo-green.png"
|
||||
# - "--label=io.artifacthub.package.readme-url=https://raw.githubusercontent.com/OpenIMSDK/Open-IM-Server/main/README.md"
|
||||
# - "--label=io.artifacthub.package.logo-url=hhttps://github.com/OpenIMSDK/Open-IM-Server/blob/main/assets/logo/openim-logo-green.png"
|
||||
# - '--label=io.artifacthub.package.maintainers=[{"name":"Xinwei Xiong","email":"3293172751nss@gmail.com"}]'
|
||||
# - "--label=io.artifacthub.package.license=Apace-2.0"
|
||||
# - "--label=org.opencontainers.image.description=OpenIM Open source top instant messaging system"
|
||||
@@ -399,12 +359,12 @@ changelog:
|
||||
# - image_templates:
|
||||
# - "goreleaser/goreleaser:{{ .Tag }}-arm64"
|
||||
# - "ghcr.io/goreleaser/goreleaser:{{ .Tag }}-arm64"
|
||||
# dockerfile: build/images/openim-api/Dockerfile.release
|
||||
# dockerfile: Dockerfile
|
||||
# use: buildx
|
||||
# build_flag_templates:
|
||||
# - "--pull"
|
||||
# - "--label=io.artifacthub.package.readme-url=https://raw.githubusercontent.com/openimsdk/open-im-server/main/README.md"
|
||||
# - "--label=io.artifacthub.package.logo-url=hhttps://github.com/openimsdk/open-im-server/blob/main/assets/logo/openim-logo-green.png"
|
||||
# - "--label=io.artifacthub.package.readme-url=https://raw.githubusercontent.com/OpenIMSDK/Open-IM-Server/main/README.md"
|
||||
# - "--label=io.artifacthub.package.logo-url=hhttps://github.com/OpenIMSDK/Open-IM-Server/blob/main/assets/logo/openim-logo-green.png"
|
||||
# - '--label=io.artifacthub.package.maintainers=[{"name":"Xinwei Xiong","email":"3293172751nss@gmail.com"}]'
|
||||
# - "--label=io.artifacthub.package.license=Apace-2.0"
|
||||
# - "--label=org.opencontainers.image.description=OpenIM Open source top instant messaging system"
|
||||
@@ -454,7 +414,7 @@ nfpms:
|
||||
- openim-rpc-user
|
||||
# Your app's vendor.
|
||||
vendor: OpenIMSDK
|
||||
homepage: https://github.com/openimsdk/open-im-server
|
||||
homepage: https://github.com/OpenIMSDK/Open-IM-Server
|
||||
maintainer: kubbot <https://github.com/kubbot>
|
||||
description: |-
|
||||
Auto sync github labels
|
||||
@@ -519,4 +479,4 @@ checksum:
|
||||
algorithm: sha256
|
||||
|
||||
release:
|
||||
prerelease: auto
|
||||
prerelease: auto
|
||||
@@ -19,6 +19,7 @@
|
||||
FROM golang:1.20 AS builder
|
||||
|
||||
ARG GO111MODULE=on
|
||||
ARG GOPROXY=https://goproxy.cn,direct
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
@@ -30,15 +31,19 @@ RUN go mod download
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN make clean
|
||||
RUN make build BINS=openim-api
|
||||
|
||||
RUN cp /openim/openim-server/_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-api /usr/bin/openim-api
|
||||
|
||||
# FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
||||
FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
COPY --from=builder /usr/bin/openim-api ./bin/openim-api
|
||||
COPY --from=builder /openim/openim-server/_output/bin/platforms /openim/openim-server/_output/bin/platforms
|
||||
COPY --from=builder /openim/openim-server/config /openim/openim-server/config
|
||||
|
||||
ENTRYPOINT ["./bin/openim-api"]
|
||||
ENV PORT 10002
|
||||
|
||||
EXPOSE ${PORT}
|
||||
|
||||
CMD ["bash", "-c","${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-api --port ${PORT} -c ${SERVER_WORKDIR}/config"]
|
||||
@@ -19,6 +19,7 @@
|
||||
FROM golang:1.20 AS builder
|
||||
|
||||
ARG GO111MODULE=on
|
||||
ARG GOPROXY=https://goproxy.cn,direct
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
@@ -30,15 +31,15 @@ RUN go mod download
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN go mod download
|
||||
RUN make clean
|
||||
RUN make build BINS=openim-cmdutils
|
||||
RUN cp /openim/openim-server/_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-cmdutils /usr/bin/openim-cmdutils
|
||||
|
||||
FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
COPY --from=builder /usr/bin/openim-cmdutils ./bin/openim-cmdutils
|
||||
COPY --from=builder $OPENIM_SERVER_BINDIR/platforms /openim/openim-server/_output/bin/platforms
|
||||
COPY --from=builder ${SERVER_WORKDIR}/config /openim/openim-server/config
|
||||
|
||||
ENTRYPOINT ["./bin/openim-cmdutils"]
|
||||
|
||||
CMD ["--help"]
|
||||
CMD ["bash", "-c","${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-cmdutils"]
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
FROM golang:1.20 AS builder
|
||||
|
||||
ARG GO111MODULE=on
|
||||
ARG GOPROXY=https://goproxy.cn,direct
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
@@ -30,15 +31,14 @@ RUN go mod download
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN make clean
|
||||
RUN make build BINS=openim-crontask
|
||||
|
||||
RUN cp /openim/openim-server/_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-crontask /usr/bin/openim-crontask
|
||||
|
||||
# FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
||||
FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
COPY --from=builder /usr/bin/openim-crontask ./bin/openim-crontask
|
||||
COPY --from=builder /openim/openim-server/_output/bin/platforms /openim/openim-server/_output/bin/platforms
|
||||
COPY --from=builder /openim/openim-server/config /openim/openim-server/config
|
||||
|
||||
ENTRYPOINT ["./bin/openim-crontask"]
|
||||
CMD ["bash", "-c","${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-crontask"]
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
FROM golang:1.20 AS builder
|
||||
|
||||
ARG GO111MODULE=on
|
||||
ARG GOPROXY=https://goproxy.cn,direct
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
@@ -30,15 +31,20 @@ RUN go mod download
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN make clean
|
||||
RUN make build BINS=openim-msggateway
|
||||
|
||||
RUN cp /openim/openim-server/_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-msggateway /usr/bin/openim-msggateway
|
||||
|
||||
# FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
||||
FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
COPY --from=builder /usr/bin/openim-msggateway ./bin/openim-msggateway
|
||||
COPY --from=builder /openim/openim-server/_output/bin/platforms /openim/openim-server/_output/bin/platforms
|
||||
COPY --from=builder /openim/openim-server/config /openim/openim-server/config
|
||||
|
||||
ENTRYPOINT ["./bin/openim-msggateway"]
|
||||
ENV OS ${OS}
|
||||
ENV ARCH ${ARCH}
|
||||
|
||||
EXPOSE 10140
|
||||
EXPOSE 10001
|
||||
|
||||
CMD ${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-msggateway --port 10140 --ws_port 10001
|
||||
@@ -19,6 +19,7 @@
|
||||
FROM golang:1.20 AS builder
|
||||
|
||||
ARG GO111MODULE=on
|
||||
ARG GOPROXY=https://goproxy.cn,direct
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
@@ -30,15 +31,17 @@ RUN go mod download
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN make clean
|
||||
RUN make build BINS=openim-msgtransfer
|
||||
|
||||
RUN cp /openim/openim-server/_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-msgtransfer /usr/bin/openim-msgtransfer
|
||||
|
||||
# FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
||||
FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
||||
|
||||
ENV OS ${OS}
|
||||
ENV ARCH ${ARCH}
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
COPY --from=builder /usr/bin/openim-msgtransfer ./bin/openim-msgtransfer
|
||||
COPY --from=builder /openim/openim-server/_output/bin/platforms /openim/openim-server/_output/bin/platforms
|
||||
COPY --from=builder /openim/openim-server/config /openim/openim-server/config
|
||||
|
||||
ENTRYPOINT ["./bin/openim-msgtransfer"]
|
||||
CMD ${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-msgtransfer
|
||||
@@ -19,6 +19,7 @@
|
||||
FROM golang:1.20 AS builder
|
||||
|
||||
ARG GO111MODULE=on
|
||||
ARG GOPROXY=https://goproxy.cn,direct
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
@@ -30,15 +31,19 @@ RUN go mod download
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN make clean
|
||||
RUN make build BINS=openim-push
|
||||
|
||||
RUN cp /openim/openim-server/_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-push /usr/bin/openim-push
|
||||
|
||||
# FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
||||
FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
COPY --from=builder /usr/bin/openim-push ./bin/openim-push
|
||||
ENV OS ${OS}
|
||||
ENV ARCH ${ARCH}
|
||||
|
||||
ENTRYPOINT ["./bin/openim-push"]
|
||||
COPY --from=builder /openim/openim-server/_output/bin/platforms /openim/openim-server/_output/bin/platforms
|
||||
COPY --from=builder /openim/openim-server/config /openim/openim-server/config
|
||||
|
||||
EXPOSE 10170
|
||||
|
||||
CMD ${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-push --port 10170
|
||||
@@ -19,6 +19,7 @@
|
||||
FROM golang:1.20 AS builder
|
||||
|
||||
ARG GO111MODULE=on
|
||||
ARG GOPROXY=https://goproxy.cn,direct
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
@@ -30,15 +31,23 @@ RUN go mod download
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN make build BINS=openim-rpc-auth
|
||||
RUN make clean
|
||||
|
||||
RUN cp /openim/openim-server/_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-auth /usr/bin/openim-rpc-auth
|
||||
# RUN make build BINS=openim-rpc
|
||||
|
||||
RUN CGO_ENABLED=0 go build -ldflags="-w -s" -o ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-auth ./cmd/openim-rpc/openim-rpc-auth
|
||||
|
||||
# FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
||||
FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
COPY --from=builder /usr/bin/openim-rpc-auth ./bin/openim-rpc-auth
|
||||
ENV OS ${OS}
|
||||
ENV ARCH ${ARCH}
|
||||
|
||||
ENTRYPOINT ["./bin/openim-rpc-auth"]
|
||||
COPY --from=builder /openim/openim-server/_output/bin/platforms /openim/openim-server/_output/bin/platforms/
|
||||
COPY --from=builder /openim/openim-server/config /openim/openim-server/config
|
||||
|
||||
EXPOSE 10160
|
||||
|
||||
# ENTRYPOINT
|
||||
CMD ["bash", "-c","${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-rpc-auth --port 10160 -c ${SERVER_WORKDIR}/config"]
|
||||
@@ -19,6 +19,7 @@
|
||||
FROM golang:1.20 AS builder
|
||||
|
||||
ARG GO111MODULE=on
|
||||
ARG GOPROXY=https://goproxy.cn,direct
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
@@ -30,15 +31,29 @@ RUN go mod download
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN make build BINS=openim-rpc-conversation
|
||||
RUN make clean
|
||||
|
||||
RUN cp /openim/openim-server/_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-conversation /usr/bin/openim-rpc-conversation
|
||||
RUN make build BINS=openim-rpc
|
||||
# RUN CGO_ENABLED=0 go build -ldflags="-w -s" -o ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-conversation ./cmd/openim-rpc/openim-rpc-conversation
|
||||
|
||||
RUN rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-friend && \
|
||||
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-group && \
|
||||
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-msg && \
|
||||
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-third && \
|
||||
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-user && \
|
||||
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-auth
|
||||
|
||||
# FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
||||
FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
COPY --from=builder /usr/bin/openim-rpc-conversation ./bin/openim-rpc-conversation
|
||||
ENV OS ${OS}
|
||||
ENV ARCH ${ARCH}
|
||||
|
||||
ENTRYPOINT ["./bin/openim-rpc-conversation"]
|
||||
COPY --from=builder /openim/openim-server/_output/bin/platforms /openim/openim-server/_output/bin/platforms/
|
||||
COPY --from=builder /openim/openim-server/config /openim/openim-server/config
|
||||
|
||||
EXPOSE 10230
|
||||
EXPOSE 20230
|
||||
|
||||
CMD ["bash", "-c","${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-rpc-conversation --port 10230 --prometheus_port 20230 -c ${SERVER_WORKDIR}/config"]
|
||||
@@ -19,6 +19,7 @@
|
||||
FROM golang:1.20 AS builder
|
||||
|
||||
ARG GO111MODULE=on
|
||||
ARG GOPROXY=https://goproxy.cn,direct
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
@@ -30,15 +31,29 @@ RUN go mod download
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN make build BINS=openim-rpc-friend
|
||||
RUN make clean
|
||||
|
||||
RUN cp /openim/openim-server/_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-friend /usr/bin/openim-rpc-friend
|
||||
RUN make build BINS=openim-rpc
|
||||
# RUN CGO_ENABLED=0 go build -ldflags="-w -s" -o ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-friend ./cmd/openim-rpc/openim-rpc-friend
|
||||
|
||||
RUN rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-group && \
|
||||
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-msg && \
|
||||
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-third && \
|
||||
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-user && \
|
||||
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-conversation && \
|
||||
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-auth
|
||||
|
||||
# FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
||||
FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
COPY --from=builder /usr/bin/openim-rpc-friend ./bin/openim-rpc-friend
|
||||
ENV OS ${OS}
|
||||
ENV ARCH ${ARCH}
|
||||
|
||||
ENTRYPOINT ["./bin/openim-rpc-friend"]
|
||||
COPY --from=builder /openim/openim-server/_output/bin/platforms /openim/openim-server/_output/bin/platforms/
|
||||
COPY --from=builder /openim/openim-server/config /openim/openim-server/config
|
||||
|
||||
EXPOSE 10120
|
||||
EXPOSE 20120
|
||||
|
||||
CMD ["bash", "-c","${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-rpc-friend --port 10120 --prometheus_port 20120 -c ${SERVER_WORKDIR}/config"]
|
||||
@@ -19,6 +19,7 @@
|
||||
FROM golang:1.20 AS builder
|
||||
|
||||
ARG GO111MODULE=on
|
||||
ARG GOPROXY=https://goproxy.cn,direct
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
@@ -30,15 +31,29 @@ RUN go mod download
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN make build BINS=openim-rpc-group
|
||||
RUN make clean
|
||||
|
||||
RUN cp /openim/openim-server/_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-group /usr/bin/openim-rpc-group
|
||||
RUN make build BINS=openim-rpc
|
||||
# RUN CGO_ENABLED=0 go build -ldflags="-w -s" -o ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-group ./cmd/openim-rpc/openim-rpc-group
|
||||
|
||||
RUN rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-friend && \
|
||||
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-msg && \
|
||||
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-third && \
|
||||
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-user && \
|
||||
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-conversation && \
|
||||
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-auth
|
||||
|
||||
# FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
||||
FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
COPY --from=builder /usr/bin/openim-rpc-group ./bin/openim-rpc-group
|
||||
ENV OS ${OS}
|
||||
ENV ARCH ${ARCH}
|
||||
|
||||
ENTRYPOINT ["./bin/openim-rpc-group"]
|
||||
COPY --from=builder /openim/openim-server/_output/bin/platforms /openim/openim-server/_output/bin/platforms/
|
||||
COPY --from=builder /openim/openim-server/config /openim/openim-server/config
|
||||
|
||||
EXPOSE 10150
|
||||
EXPOSE 20150
|
||||
|
||||
CMD ["bash", "-c","${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-rpc-group --port 10150 --prometheus_port 20150 -c ${SERVER_WORKDIR}/config"]
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user