Skip to content

Commit

Permalink
feat: set github hub
Browse files Browse the repository at this point in the history
Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]>
  • Loading branch information
cubxxw committed Aug 2, 2023
1 parent 3862200 commit 22a126e
Show file tree
Hide file tree
Showing 6 changed files with 123 additions and 123 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/docker-buildx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
with:
context: .
file: ./build/docker/api-admin/Dockerfile
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta1.outputs.tags }}
labels: ${{ steps.meta1.outputs.labels }}
Expand All @@ -72,7 +72,7 @@ jobs:
with:
context: .
file: ./build/docker/api-chat/Dockerfile
platforms: linux/amd64,linux/arm64,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 }}
Expand All @@ -88,7 +88,7 @@ jobs:
with:
context: .
file: ./build/docker/rpc-admin/Dockerfile
platforms: linux/amd64,linux/arm64,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 }}
Expand All @@ -104,7 +104,7 @@ jobs:
with:
context: .
file: ./build/docker/rpc-chat/Dockerfile
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta4.outputs.tags }}
labels: ${{ steps.meta4.outputs.labels }}
228 changes: 114 additions & 114 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -212,120 +212,120 @@ changelog:
- title: Other work
order: 9999

dockers:
- image_templates:
- "openim/openim-chat-api-chat:{{ .Tag }}-amd64"
- "ghcr.io/openimsdk/openim-chat-api-chat:{{ .Tag }}-amd64"
- "registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-chat-api-chat:{{ .Tag }}-amd64"
build_flag_templates:
- "--pull"
- "--label=io.artifacthub.package.readme-url=https://raw.githubusercontent.com/OpenIMSDK/chat/main/README.md"
- "--label=io.artifacthub.package.logo-url=hhttps://github.com/OpenIMSDK/chat/blob/main/assets/logo/openim-logo-green.png"
- '--label=io.artifacthub.package.maintainers=[{"name":"Xinwei Xiong","email":"[email protected]"}]'
- "--label=io.artifacthub.package.license=Apace-2.0"
- "--label=org.opencontainers.image.description=OpenIM Open source top instant messaging system"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.name={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.source={{.GitURL}}"
- "--platform=linux/amd64"
goos: linux
goarch: amd64
dockerfile: ./build/docker/api-chat/Dockerfile
use: buildx

- image_templates:
- "openim/openim-chat-api-chat:{{ .Tag }}-arm64"
- "ghcr.io/openimsdk/openim-chat-api-chat:{{ .Tag }}-arm64"
- "registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-chat-api-chat:{{ .Tag }}-arm64"
build_flag_templates:
- "--pull"
- "--label=io.artifacthub.package.readme-url=https://raw.githubusercontent.com/OpenIMSDK/chat/main/README.md"
- "--label=io.artifacthub.package.logo-url=hhttps://github.com/OpenIMSDK/chat/blob/main/assets/logo/openim-logo-green.png"
- '--label=io.artifacthub.package.maintainers=[{"name":"Xinwei Xiong","email":"[email protected]"}]'
- "--label=io.artifacthub.package.license=Apace-2.0"
- "--label=org.opencontainers.image.description=OpenIM Open source top instant messaging system"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.name={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.source={{.GitURL}}"
- "--platform=linux/arm64"
goos: linux
goarch: arm64
dockerfile: ./build/docker/api-chat/Dockerfile
use: buildx

- image_templates:
- "openim/openim-chat-api-admin:{{ .Tag }}-amd64"
- "ghcr.io/openimsdk/openim-chat-api-admin:{{ .Tag }}-amd64"
- "registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-chat-api-admin:{{ .Tag }}-amd64"
build_flag_templates:
- "--pull"
- "--label=io.artifacthub.package.readme-url=https://raw.githubusercontent.com/OpenIMSDK/chat/main/README.md"
- "--label=io.artifacthub.package.logo-url=hhttps://github.com/OpenIMSDK/chat/blob/main/assets/logo/openim-logo-green.png"
- '--label=io.artifacthub.package.maintainers=[{"name":"Xinwei Xiong","email":"[email protected]"}]'
- "--label=io.artifacthub.package.license=Apace-2.0"
- "--label=org.opencontainers.image.description=OpenIM Open source top instant messaging system"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.name={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.source={{.GitURL}}"
- "--platform=linux/amd64"
goos: linux
goarch: amd64
dockerfile: ./build/docker/api-admin/Dockerfile
use: buildx

- image_templates:
- "openim/openim-chat-api-admin:{{ .Tag }}-arm64"
- "ghcr.io/openimsdk/openim-chat-api-admin:{{ .Tag }}-arm64"
- "registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-chat-api-admin:{{ .Tag }}-arm64"
build_flag_templates:
- "--pull"
- "--label=io.artifacthub.package.readme-url=https://raw.githubusercontent.com/OpenIMSDK/chat/main/README.md"
- "--label=io.artifacthub.package.logo-url=hhttps://github.com/OpenIMSDK/chat/blob/main/assets/logo/openim-logo-green.png"
- '--label=io.artifacthub.package.maintainers=[{"name":"Xinwei Xiong","email":"[email protected]"}]'
- "--label=io.artifacthub.package.license=Apace-2.0"
- "--label=org.opencontainers.image.description=OpenIM Open source top instant messaging system"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.name={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.source={{.GitURL}}"
- "--platform=linux/arm64"
goos: linux
goarch: arm64
dockerfile: ./build/docker/api-admin/Dockerfile
use: buildx

docker_manifests:
- name_template: "openim/openim-chat-api-admin:{{ .Tag }}"
image_templates:
- "openim/openim-chat-api-admin:{{ .Tag }}-amd64"
- "openim/openim-chat-api-admin:{{ .Tag }}-arm64"
- name_template: "ghcr.io/openimsdk/openim-chat:{{ .Tag }}"
image_templates:
- "ghcr.io/openimsdk/openim-chat:{{ .Tag }}-amd64"
- "ghcr.io/openimsdk/openim-chat:{{ .Tag }}-arm64"
- name_template: "registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-chat-api-admin:{{ .Tag }}"
image_templates:
- "registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-chat-api-admin:{{ .Tag }}-amd64"
- "registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-chat-api-admin:{{ .Tag }}-arm64"
- name_template: "openim/openim-chat-api-admin:latest"
image_templates:
- "openim/openim-chat-api-chat:{{ .Tag }}-amd64"
- "openim/openim-chat-api-chat:{{ .Tag }}-arm64"
- name_template: "ghcr.io/openimsdk/openim-chat-api-chat:latest"
image_templates:
- "ghcr.io/openimsdk/openim-chat-api-chat:{{ .Tag }}-amd64"
- "ghcr.io/openimsdk/openim-chat-api-chat:{{ .Tag }}-arm64"
- name_template: "registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-chat-api-chat:latest"
image_templates:
- "registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-chat-api-chat:{{ .Tag }}-amd64"
- "registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-chat-api-chat:{{ .Tag }}-arm64"
# dockers:
# - image_templates:
# - "openim/openim-chat-api-chat:{{ .Tag }}-amd64"
# - "ghcr.io/openimsdk/openim-chat-api-chat:{{ .Tag }}-amd64"
# - "registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-chat-api-chat:{{ .Tag }}-amd64"
# build_flag_templates:
# - "--pull"
# - "--label=io.artifacthub.package.readme-url=https://raw.githubusercontent.com/OpenIMSDK/chat/main/README.md"
# - "--label=io.artifacthub.package.logo-url=hhttps://github.com/OpenIMSDK/chat/blob/main/assets/logo/openim-logo-green.png"
# - '--label=io.artifacthub.package.maintainers=[{"name":"Xinwei Xiong","email":"[email protected]"}]'
# - "--label=io.artifacthub.package.license=Apace-2.0"
# - "--label=org.opencontainers.image.description=OpenIM Open source top instant messaging system"
# - "--label=org.opencontainers.image.created={{.Date}}"
# - "--label=org.opencontainers.image.name={{.ProjectName}}"
# - "--label=org.opencontainers.image.revision={{.FullCommit}}"
# - "--label=org.opencontainers.image.version={{.Version}}"
# - "--label=org.opencontainers.image.source={{.GitURL}}"
# - "--platform=linux/amd64"
# goos: linux
# goarch: amd64
# dockerfile: ./build/docker/api-chat/Dockerfile
# use: buildx

# - image_templates:
# - "openim/openim-chat-api-chat:{{ .Tag }}-arm64"
# - "ghcr.io/openimsdk/openim-chat-api-chat:{{ .Tag }}-arm64"
# - "registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-chat-api-chat:{{ .Tag }}-arm64"
# build_flag_templates:
# - "--pull"
# - "--label=io.artifacthub.package.readme-url=https://raw.githubusercontent.com/OpenIMSDK/chat/main/README.md"
# - "--label=io.artifacthub.package.logo-url=hhttps://github.com/OpenIMSDK/chat/blob/main/assets/logo/openim-logo-green.png"
# - '--label=io.artifacthub.package.maintainers=[{"name":"Xinwei Xiong","email":"[email protected]"}]'
# - "--label=io.artifacthub.package.license=Apace-2.0"
# - "--label=org.opencontainers.image.description=OpenIM Open source top instant messaging system"
# - "--label=org.opencontainers.image.created={{.Date}}"
# - "--label=org.opencontainers.image.name={{.ProjectName}}"
# - "--label=org.opencontainers.image.revision={{.FullCommit}}"
# - "--label=org.opencontainers.image.version={{.Version}}"
# - "--label=org.opencontainers.image.source={{.GitURL}}"
# - "--platform=linux/arm64"
# goos: linux
# goarch: arm64
# dockerfile: ./build/docker/api-chat/Dockerfile
# use: buildx

# - image_templates:
# - "openim/openim-chat-api-admin:{{ .Tag }}-amd64"
# - "ghcr.io/openimsdk/openim-chat-api-admin:{{ .Tag }}-amd64"
# - "registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-chat-api-admin:{{ .Tag }}-amd64"
# build_flag_templates:
# - "--pull"
# - "--label=io.artifacthub.package.readme-url=https://raw.githubusercontent.com/OpenIMSDK/chat/main/README.md"
# - "--label=io.artifacthub.package.logo-url=hhttps://github.com/OpenIMSDK/chat/blob/main/assets/logo/openim-logo-green.png"
# - '--label=io.artifacthub.package.maintainers=[{"name":"Xinwei Xiong","email":"[email protected]"}]'
# - "--label=io.artifacthub.package.license=Apace-2.0"
# - "--label=org.opencontainers.image.description=OpenIM Open source top instant messaging system"
# - "--label=org.opencontainers.image.created={{.Date}}"
# - "--label=org.opencontainers.image.name={{.ProjectName}}"
# - "--label=org.opencontainers.image.revision={{.FullCommit}}"
# - "--label=org.opencontainers.image.version={{.Version}}"
# - "--label=org.opencontainers.image.source={{.GitURL}}"
# - "--platform=linux/amd64"
# goos: linux
# goarch: amd64
# dockerfile: ./build/docker/api-admin/Dockerfile
# use: buildx

# - image_templates:
# - "openim/openim-chat-api-admin:{{ .Tag }}-arm64"
# - "ghcr.io/openimsdk/openim-chat-api-admin:{{ .Tag }}-arm64"
# - "registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-chat-api-admin:{{ .Tag }}-arm64"
# build_flag_templates:
# - "--pull"
# - "--label=io.artifacthub.package.readme-url=https://raw.githubusercontent.com/OpenIMSDK/chat/main/README.md"
# - "--label=io.artifacthub.package.logo-url=hhttps://github.com/OpenIMSDK/chat/blob/main/assets/logo/openim-logo-green.png"
# - '--label=io.artifacthub.package.maintainers=[{"name":"Xinwei Xiong","email":"[email protected]"}]'
# - "--label=io.artifacthub.package.license=Apace-2.0"
# - "--label=org.opencontainers.image.description=OpenIM Open source top instant messaging system"
# - "--label=org.opencontainers.image.created={{.Date}}"
# - "--label=org.opencontainers.image.name={{.ProjectName}}"
# - "--label=org.opencontainers.image.revision={{.FullCommit}}"
# - "--label=org.opencontainers.image.version={{.Version}}"
# - "--label=org.opencontainers.image.source={{.GitURL}}"
# - "--platform=linux/arm64"
# goos: linux
# goarch: arm64
# dockerfile: ./build/docker/api-admin/Dockerfile
# use: buildx

# docker_manifests:
# - name_template: "openim/openim-chat-api-admin:{{ .Tag }}"
# image_templates:
# - "openim/openim-chat-api-admin:{{ .Tag }}-amd64"
# - "openim/openim-chat-api-admin:{{ .Tag }}-arm64"
# - name_template: "ghcr.io/openimsdk/openim-chat:{{ .Tag }}"
# image_templates:
# - "ghcr.io/openimsdk/openim-chat:{{ .Tag }}-amd64"
# - "ghcr.io/openimsdk/openim-chat:{{ .Tag }}-arm64"
# - name_template: "registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-chat-api-admin:{{ .Tag }}"
# image_templates:
# - "registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-chat-api-admin:{{ .Tag }}-amd64"
# - "registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-chat-api-admin:{{ .Tag }}-arm64"
# - name_template: "openim/openim-chat-api-admin:latest"
# image_templates:
# - "openim/openim-chat-api-chat:{{ .Tag }}-amd64"
# - "openim/openim-chat-api-chat:{{ .Tag }}-arm64"
# - name_template: "ghcr.io/openimsdk/openim-chat-api-chat:latest"
# image_templates:
# - "ghcr.io/openimsdk/openim-chat-api-chat:{{ .Tag }}-amd64"
# - "ghcr.io/openimsdk/openim-chat-api-chat:{{ .Tag }}-arm64"
# - name_template: "registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-chat-api-chat:latest"
# image_templates:
# - "registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-chat-api-chat:{{ .Tag }}-amd64"
# - "registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-chat-api-chat:{{ .Tag }}-arm64"

nfpms:
- id: packages
Expand Down
2 changes: 1 addition & 1 deletion build/docker/api-admin/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ COPY . .
RUN go mod download
RUN CGO_ENABLED=0 GOOS=${GOOS} GOARCH=${GOARCH} go build -o /openim/openim-chat/bin/open_im_admin_api ./cmd/api/admin_api

FROM ghcr.io/openim-sigs/openim-bash-image:v1.0.1
FROM ghcr.io/openim-sigs/openim-bash-image:latest

WORKDIR ${CHAT_WORKDIR}

Expand Down
2 changes: 1 addition & 1 deletion build/docker/api-chat/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ COPY . .
RUN go mod download
RUN CGO_ENABLED=0 GOOS=${GOOS} GOARCH=${GOARCH} go build -o /openim/openim-chat/bin/open_im_chat_api ./cmd/api/chat_api

FROM ghcr.io/openim-sigs/openim-bash-image:v1.0.1
FROM ghcr.io/openim-sigs/openim-bash-image:latest

WORKDIR ${CHAT_WORKDIR}

Expand Down
4 changes: 2 additions & 2 deletions build/docker/rpc-admin/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ COPY . .
RUN go mod download
RUN CGO_ENABLED=0 GOOS=${GOOS} GOARCH=${GOARCH} go build -o /openim/openim-chat/bin/open_im_admin_rpc ./cmd/rpc/admin

FROM ghcr.io/openim-sigs/openim-bash-image:v1.0.1
FROM ghcr.io/openim-sigs/openim-bash-image:latest

WORKDIR ${CHAT_WORKDIR}

Expand All @@ -41,4 +41,4 @@ COPY --from=builder ${OPENIM_CHAT_CONFIG_NAME} /openim/openim-chat/config/config
env PORT=30200

EXPOSE ${PORT}
CMD ["sh", "-c","${OPENIM_CHAT_BINDIR}/open_im_admin_rpc","--port", "${PORT}","--config_folder_path","${OPENIM_CHAT_CONFIG_NAME}"]
CMD ["sh", "-c", "${OPENIM_CHAT_BINDIR}/open_im_admin_rpc","--port", "${PORT}","--config_folder_path","${OPENIM_CHAT_CONFIG_NAME}"]
2 changes: 1 addition & 1 deletion build/docker/rpc-chat/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ COPY . .
RUN go mod download
RUN CGO_ENABLED=0 GOOS=${GOOS} GOARCH=${GOARCH} go build -o /openim/openim-chat/bin/open_im_chat_rpc ./cmd/rpc/chat

FROM ghcr.io/openim-sigs/openim-bash-image:v1.0.1
FROM ghcr.io/openim-sigs/openim-bash-image:latest

WORKDIR ${CHAT_WORKDIR}

Expand Down

0 comments on commit 22a126e

Please sign in to comment.