diff --git a/.github/workflows/opencommit.yml b/.github/workflows/opencommit.yml index 80fc9e302..69f7d7f23 100644 --- a/.github/workflows/opencommit.yml +++ b/.github/workflows/opencommit.yml @@ -1,4 +1,4 @@ -name: 'OpenCommit Action' +name: 'OpenIM Commit Action' on: push: diff --git a/.github/workflows/openim-ci.yml b/.github/workflows/openim-ci.yml index 6460a43b1..2e2db4ee2 100644 --- a/.github/workflows/openim-ci.yml +++ b/.github/workflows/openim-ci.yml @@ -111,24 +111,4 @@ jobs: # - name: golangci-lint # uses: golangci/golangci-lint-action@v3 # with: -# version: ${{ env.GOLANGCI_VERSION }} - -# docker-image-tests: -# runs-on: ubuntu-20.04 -# steps: -# - name: Checkout -# uses: actions/checkout@v3 -# with: -# fetch-depth: 0 - -# - name: Set up Go -# uses: actions/setup-go@v3 -# with: -# go-version: ${{ env.GO_VERSION }} - -# - name: Run tests -# run: make build - -# - name: Test docker image -# run: | -# docker build -t openim:ci-build . +# version: ${{ env.GOLANGCI_VERSION }} \ No newline at end of file diff --git a/.github/workflows/scripts-test.yml b/.github/workflows/scripts-test.yml index 4b0dc03b4..badb33012 100644 --- a/.github/workflows/scripts-test.yml +++ b/.github/workflows/scripts-test.yml @@ -48,7 +48,6 @@ jobs: sudo ./scripts/build_all_service.sh sudo cat logs/openIM.log 2>/dev/null shell: bash - continue-on-error: true - name: Start all services run: | diff --git a/pkg/common/db/controller/user.go b/pkg/common/db/controller/user.go index e15033a62..81cabe0f6 100644 --- a/pkg/common/db/controller/user.go +++ b/pkg/common/db/controller/user.go @@ -40,9 +40,9 @@ type UserDatabase interface { Page(ctx context.Context, pageNumber, showNumber int32) (users []*relation.UserModel, count int64, err error) // 只要有一个存在就为true IsExist(ctx context.Context, userIDs []string) (exist bool, err error) - //获取所有用户ID + // 获取所有用户ID GetAllUserID(ctx context.Context, pageNumber, showNumber int32) ([]string, error) - //函数内部先查询db中是否存在,存在则什么都不做;不存在则插入 + // 函数内部先查询db中是否存在,存在则什么都不做;不存在则插入 InitOnce(ctx context.Context, users []*relation.UserModel) (err error) // 获取用户总数 CountTotal(ctx context.Context, before *time.Time) (int64, error) diff --git a/pkg/common/db/relation/user_model.go b/pkg/common/db/relation/user_model.go index 6e095f55f..d3be5dd7e 100644 --- a/pkg/common/db/relation/user_model.go +++ b/pkg/common/db/relation/user_model.go @@ -83,7 +83,7 @@ func (u *UserGorm) Page( return } -// 获取所有用户ID +// 获取所有用户ID. func (u *UserGorm) GetAllUserID(ctx context.Context, pageNumber, showNumber int32) (userIDs []string, err error) { return userIDs, errs.Wrap(u.db(ctx).Limit(int(showNumber)).Offset(int((pageNumber-1)*showNumber)).Pluck("user_id", &userIDs).Error) } diff --git a/scripts/make-rules/image.mk b/scripts/make-rules/image.mk index 31448bf24..5c17b8421 100644 --- a/scripts/make-rules/image.mk +++ b/scripts/make-rules/image.mk @@ -28,8 +28,10 @@ # - be able to push the image for your registry (i.e. if you do not inform a valid value via IMG=> then the export will fail) # To properly provided solutions that supports more than one platform you should use this option. PLATFORMS ?= linux/arm64,linux/amd64,linux/s390x,linux/ppc64le + +## Build and push docker image for the manager for cross-platform support .PHONY: docker-buildx -docker-buildx: test ## Build and push docker image for the manager for cross-platform support +docker-buildx: # copy existing Dockerfile and insert --platform=${BUILDPLATFORM} into Dockerfile.cross, and preserve the original Dockerfile sed -e '1 s/\(^FROM\)/FROM --platform=\$$\{BUILDPLATFORM\}/; t' -e ' 1,// s//FROM --platform=\$$\{BUILDPLATFORM\}/' Dockerfile > Dockerfile.cross - docker buildx create --name project-v3-builder