mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-05-07 19:22:30 +08:00
feat: set github hub
Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>
This commit is contained in:
parent
07d01d5cc6
commit
62f599317a
34
.github/dependabot.yml
vendored
34
.github/dependabot.yml
vendored
@ -9,3 +9,37 @@ updates:
|
|||||||
directory: "/"
|
directory: "/"
|
||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
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"
|
26
.github/workflows/auto-gh-pr.yml
vendored
26
.github/workflows/auto-gh-pr.yml
vendored
@ -18,30 +18,21 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
# types:
|
# types:
|
||||||
# - closed
|
# - closed
|
||||||
|
issue_comment:
|
||||||
|
types: [created]
|
||||||
|
pull_request_review_comment:
|
||||||
|
types: [created]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
create-pr:
|
create-pr:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.event.pull_request.base.ref == 'main'
|
if: github.event.pull_request.base.ref == 'main' && github.event.pull_request.merged == true
|
||||||
steps:
|
steps:
|
||||||
- name: Check out code
|
- name: Check out code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Setup GitHub CLI
|
|
||||||
run: |
|
|
||||||
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key C99B11DEB97541F0
|
|
||||||
sudo apt-add-repository https://cli.github.com/packages
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install gh
|
|
||||||
continue-on-error: true
|
|
||||||
|
|
||||||
# - name: Configure GitHub CLI
|
|
||||||
# run: |
|
|
||||||
# git config --global user.email "3293172751ysy@gmail.com"
|
|
||||||
# git config --global user.name "kubbot"
|
|
||||||
# echo "${{ secrets.BOT_GITHUB_TOKEN }}" | gh auth login --with-token
|
|
||||||
- name: Create PR to release branch
|
- name: Create PR to release branch
|
||||||
run: |
|
run: |
|
||||||
ISSUEID=$(gh pr view ${{ github.event.pull_request.number }} --repo $OWNER/$REPO | grep -oP 'Fixes #\K\d+')
|
ISSUEID=$(gh pr view ${{ github.event.pull_request.number }} --repo $OWNER/$REPO | grep -oP 'Fixes #\K\d+')
|
||||||
@ -56,10 +47,9 @@ jobs:
|
|||||||
|
|
||||||
gh pr edit ${{ github.event.pull_request.number }} --repo $OWNER/$REPO --add-label "$LABELS" --add-assignee "$ASSIGNEES" --milestone "$MILESTONE"
|
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 checkout -b bot/merge-to-release-$ISSUEID
|
||||||
git push origin 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 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"
|
# 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
|
continue-on-error: true
|
||||||
env:
|
env:
|
||||||
|
@ -114,7 +114,7 @@ linters-settings:
|
|||||||
max-blank-identifiers: 2
|
max-blank-identifiers: 2
|
||||||
dupl:
|
dupl:
|
||||||
# tokens count to trigger issue, 150 by default
|
# tokens count to trigger issue, 150 by default
|
||||||
threshold: 100
|
threshold: 200
|
||||||
errcheck:
|
errcheck:
|
||||||
# report about not checking of errors in type assertions: `a := b.(MyStruct)`;
|
# report about not checking of errors in type assertions: `a := b.(MyStruct)`;
|
||||||
# default is false: such cases aren't reported by default.
|
# default is false: such cases aren't reported by default.
|
||||||
|
@ -447,8 +447,8 @@ milestones:
|
|||||||
# Repository for the milestone
|
# Repository for the milestone
|
||||||
# Default is extracted from the origin remote URL
|
# Default is extracted from the origin remote URL
|
||||||
repo:
|
repo:
|
||||||
owner: user
|
owner: OpenIMSDK
|
||||||
name: repo
|
name: Open-IM-Server
|
||||||
|
|
||||||
# Whether to close the milestone
|
# Whether to close the milestone
|
||||||
close: true
|
close: true
|
||||||
@ -479,6 +479,9 @@ checksum:
|
|||||||
algorithm: sha256
|
algorithm: sha256
|
||||||
|
|
||||||
release:
|
release:
|
||||||
|
|
||||||
|
prerelease: auto
|
||||||
|
|
||||||
footer: |
|
footer: |
|
||||||
|
|
||||||
## Welcome to the {{ .Tag }} release of [chat](https://github.com/OpenIMSDK/chat)!🎉🎉!
|
## Welcome to the {{ .Tag }} release of [chat](https://github.com/OpenIMSDK/chat)!🎉🎉!
|
||||||
@ -493,7 +496,7 @@ release:
|
|||||||
|
|
||||||
This release is only possible thanks to **all** the support of some **awesome people**!
|
This release is only possible thanks to **all** the support of some **awesome people**!
|
||||||
|
|
||||||
https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/version.md
|
If you wish to use mirroring, read OpenIM's [image management policy](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/images.md)
|
||||||
|
|
||||||
**Want to be one of them 😘?**
|
**Want to be one of them 😘?**
|
||||||
|
|
||||||
|
13
Dockerfile
13
Dockerfile
@ -1,10 +1,6 @@
|
|||||||
# Build Stage
|
# Build Stage
|
||||||
FROM golang:1.20 AS builder
|
FROM golang:1.20 AS builder
|
||||||
|
|
||||||
LABEL org.opencontainers.image.source=https://github.com/OpenIMSDK/Open-IM-Server
|
|
||||||
LABEL org.opencontainers.image.description="OpenIM Server image"
|
|
||||||
LABEL org.opencontainers.image.licenses="Apache 2.0"
|
|
||||||
|
|
||||||
# Set go mod installation source and proxy
|
# Set go mod installation source and proxy
|
||||||
ARG GO111MODULE=on
|
ARG GO111MODULE=on
|
||||||
ARG GOPROXY=https://goproxy.cn,direct
|
ARG GOPROXY=https://goproxy.cn,direct
|
||||||
@ -19,14 +15,7 @@ ADD . .
|
|||||||
|
|
||||||
RUN /bin/sh -c "make build"
|
RUN /bin/sh -c "make build"
|
||||||
|
|
||||||
# Production Stage
|
FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
||||||
FROM alpine
|
|
||||||
|
|
||||||
RUN echo "https://mirrors.aliyun.com/alpine/v3.4/main" > /etc/apk/repositories && \
|
|
||||||
apk --no-cache add tzdata ca-certificates bash
|
|
||||||
|
|
||||||
# Set directory to map logs, config files, scripts, and SDK
|
|
||||||
VOLUME ["/Open-IM-Server/logs", "/Open-IM-Server/config", "/Open-IM-Server/scripts", "/Open-IM-Server/db/sdk"]
|
|
||||||
|
|
||||||
# Copy scripts and binary files to the production image
|
# Copy scripts and binary files to the production image
|
||||||
COPY --from=builder /Open-IM-Server/scripts /Open-IM-Server/scripts
|
COPY --from=builder /Open-IM-Server/scripts /Open-IM-Server/scripts
|
||||||
|
@ -103,11 +103,10 @@ services:
|
|||||||
image: ghcr.io/openimsdk/openim-server:main
|
image: ghcr.io/openimsdk/openim-server:main
|
||||||
container_name: openim-server
|
container_name: openim-server
|
||||||
volumes:
|
volumes:
|
||||||
- ./logs:/Open-IM-Server/logs
|
- ./logs:/openim/openim-server/logs
|
||||||
- ./config/config.yaml:/Open-IM-Server/config/config.yaml
|
- ./config/config.yaml:/openim/openim-server/config/config.yaml
|
||||||
- ./config/notification.yaml:/Open-IM-Server/config/notification.yaml
|
- ./config/notification.yaml:/openim/openim-server/config/notification.yaml
|
||||||
- ${DATA_DIR}/db/sdk:/Open-IM-Server/db/sdk
|
- ./scripts:/openim/openim-server/scripts
|
||||||
- ./scripts:/Open-IM-Server/scripts
|
|
||||||
restart: always
|
restart: always
|
||||||
depends_on:
|
depends_on:
|
||||||
- zookeeper
|
- zookeeper
|
||||||
|
@ -13,50 +13,53 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
function style-info() {
|
||||||
|
COLOR_SUFFIX="\033[0m" # End all colors and special effects
|
||||||
|
|
||||||
COLOR_SUFFIX="\033[0m" # End all colors and special effects
|
BLACK_PREFIX="\033[30m" # Black prefix
|
||||||
|
RED_PREFIX="\033[31m" # Red prefix
|
||||||
|
GREEN_PREFIX="\033[32m" # Green prefix
|
||||||
|
YELLOW_PREFIX="\033[33m" # Yellow prefix
|
||||||
|
BLUE_PREFIX="\033[34m" # Blue prefix
|
||||||
|
PURPLE_PREFIX="\033[35m" # Purple prefix
|
||||||
|
SKY_BLUE_PREFIX="\033[36m" # Sky blue prefix
|
||||||
|
WHITE_PREFIX="\033[37m" # White prefix
|
||||||
|
BOLD_PREFIX="\033[1m" # Bold prefix
|
||||||
|
UNDERLINE_PREFIX="\033[4m" # Underline prefix
|
||||||
|
ITALIC_PREFIX="\033[3m" # Italic prefix
|
||||||
|
|
||||||
BLACK_PREFIX="\033[30m" # Black prefix
|
CYAN_PREFIX="033[0;36m" # Cyan prefix
|
||||||
RED_PREFIX="\033[31m" # Red prefix
|
|
||||||
GREEN_PREFIX="\033[32m" # Green prefix
|
|
||||||
YELLOW_PREFIX="\033[33m" # Yellow prefix
|
|
||||||
BLUE_PREFIX="\033[34m" # Blue prefix
|
|
||||||
PURPLE_PREFIX="\033[35m" # Purple prefix
|
|
||||||
SKY_BLUE_PREFIX="\033[36m" # Sky blue prefix
|
|
||||||
WHITE_PREFIX="\033[37m" # White prefix
|
|
||||||
BOLD_PREFIX="\033[1m" # Bold prefix
|
|
||||||
UNDERLINE_PREFIX="\033[4m" # Underline prefix
|
|
||||||
ITALIC_PREFIX="\033[3m" # Italic prefix
|
|
||||||
|
|
||||||
CYAN_PREFIX="033[0;36m" # Cyan prefix
|
BACKGROUND_BLACK="\033[40m" # Black background
|
||||||
|
BACKGROUND_RED="\033[41m" # Red background
|
||||||
|
BACKGROUND_GREEN="\033[42m" # Green background
|
||||||
|
BACKGROUND_YELLOW="\033[43m" # Yellow background
|
||||||
|
BACKGROUND_BLUE="\033[44m" # Blue background
|
||||||
|
BACKGROUND_PURPLE="\033[45m" # Purple background
|
||||||
|
BACKGROUND_SKY_BLUE="\033[46m" # Sky blue background
|
||||||
|
BACKGROUND_WHITE="\033[47m" # White background
|
||||||
|
|
||||||
BACKGROUND_BLACK="\033[40m" # Black background
|
BLINK="\033[5m" # Blinking effect
|
||||||
BACKGROUND_RED="\033[41m" # Red background
|
INVERT="\033[7m" # Invert color
|
||||||
BACKGROUND_GREEN="\033[42m" # Green background
|
HIDE="\033[8m" # Hide text
|
||||||
BACKGROUND_YELLOW="\033[43m" # Yellow background
|
|
||||||
BACKGROUND_BLUE="\033[44m" # Blue background
|
|
||||||
BACKGROUND_PURPLE="\033[45m" # Purple background
|
|
||||||
BACKGROUND_SKY_BLUE="\033[46m" # Sky blue background
|
|
||||||
BACKGROUND_WHITE="\033[47m" # White background
|
|
||||||
|
|
||||||
BLINK="\033[5m" # Blinking effect
|
GRAY_PREFIX="\033[90m" # Gray prefix
|
||||||
INVERT="\033[7m" # Invert color
|
LIGHT_RED_PREFIX="\033[91m" # Light red prefix
|
||||||
HIDE="\033[8m" # Hide text
|
LIGHT_GREEN_PREFIX="\033[92m" # Light green prefix
|
||||||
|
LIGHT_YELLOW_PREFIX="\033[93m" # Light yellow prefix
|
||||||
|
LIGHT_BLUE_PREFIX="\033[94m" # Light blue prefix
|
||||||
|
LIGHT_PURPLE_PREFIX="\033[95m" # Light purple prefix
|
||||||
|
LIGHT_SKY_BLUE_PREFIX="\033[96m" # Light sky blue prefix
|
||||||
|
LIGHT_WHITE_PREFIX="\033[97m" # Light white prefix
|
||||||
|
|
||||||
GRAY_PREFIX="\033[90m" # Gray prefix
|
BACKGROUND_GRAY="\033[100m" # Gray background
|
||||||
LIGHT_RED_PREFIX="\033[91m" # Light red prefix
|
BACKGROUND_LIGHT_RED="\033[101m" # Light red background
|
||||||
LIGHT_GREEN_PREFIX="\033[92m" # Light green prefix
|
BACKGROUND_LIGHT_GREEN="\033[102m" # Light green background
|
||||||
LIGHT_YELLOW_PREFIX="\033[93m" # Light yellow prefix
|
BACKGROUND_LIGHT_YELLOW="\033[103m" # Light yellow background
|
||||||
LIGHT_BLUE_PREFIX="\033[94m" # Light blue prefix
|
BACKGROUND_LIGHT_BLUE="\033[104m" # Light blue background
|
||||||
LIGHT_PURPLE_PREFIX="\033[95m" # Light purple prefix
|
BACKGROUND_LIGHT_PURPLE="\033[105m" # Light purple background
|
||||||
LIGHT_SKY_BLUE_PREFIX="\033[96m" # Light sky blue prefix
|
BACKGROUND_LIGHT_SKY_BLUE="\033[106m" # Light sky blue background
|
||||||
LIGHT_WHITE_PREFIX="\033[97m" # Light white prefix
|
BACKGROUND_LIGHT_WHITE="\033[107m" # Light white background
|
||||||
|
}
|
||||||
|
|
||||||
BACKGROUND_GRAY="\033[100m" # Gray background
|
style-info
|
||||||
BACKGROUND_LIGHT_RED="\033[101m" # Light red background
|
|
||||||
BACKGROUND_LIGHT_GREEN="\033[102m" # Light green background
|
|
||||||
BACKGROUND_LIGHT_YELLOW="\033[103m" # Light yellow background
|
|
||||||
BACKGROUND_LIGHT_BLUE="\033[104m" # Light blue background
|
|
||||||
BACKGROUND_LIGHT_PURPLE="\033[105m" # Light purple background
|
|
||||||
BACKGROUND_LIGHT_SKY_BLUE="\033[106m" # Light sky blue background
|
|
||||||
BACKGROUND_LIGHT_WHITE="\033[107m" # Light white background
|
|
Loading…
x
Reference in New Issue
Block a user