Skip to content

Commit

Permalink
feat: add images address
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 Jul 27, 2023
1 parent 648076a commit 5801b3c
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 61 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-buildx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Build and release Docker images
uses: docker/build-push-action@v3
with:
platforms: linux/amd64,linux/arm64/v8
platforms: linux/386,linux/amd64,linux/arm64/v8
target: ${{ matrix.bin }}
tags: ${{ steps.metadata.outputs.tags }}
push: true
14 changes: 14 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,20 @@ jobs:
go-version: stable
# More assembly might be required: Docker logins, GPG, etc. It all depends
# on your needs.

- 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 }}

- uses: goreleaser/goreleaser-action@v4
with:
# either 'goreleaser' (default) or 'goreleaser-pro':
Expand Down
118 changes: 58 additions & 60 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -198,66 +198,64 @@ changelog:
- title: Other work
order: 9999

# dockers:
# - image_templates:
# - "openimsdk/open-im-server:{{ .Tag }}-amd64"
# - "ghcr.io/goreleaser/goreleaser:{{ .Tag }}-amd64"
# 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.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"
# extra_files:
# - scripts/entrypoint.sh
# - image_templates:
# - "goreleaser/goreleaser:{{ .Tag }}-arm64"
# - "ghcr.io/goreleaser/goreleaser:{{ .Tag }}-arm64"
# 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.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"
# goarch: arm64
# extra_files:
# - scripts/entrypoint.sh

# docker_manifests:
# - name_template: "goreleaser/goreleaser:{{ .Tag }}"
# image_templates:
# - "goreleaser/goreleaser:{{ .Tag }}-amd64"
# - "goreleaser/goreleaser:{{ .Tag }}-arm64"
# - name_template: "ghcr.io/goreleaser/goreleaser:{{ .Tag }}"
# image_templates:
# - "ghcr.io/goreleaser/goreleaser:{{ .Tag }}-amd64"
# - "ghcr.io/goreleaser/goreleaser:{{ .Tag }}-arm64"
# - name_template: "goreleaser/goreleaser:latest"
# image_templates:
# - "goreleaser/goreleaser:{{ .Tag }}-amd64"
# - "goreleaser/goreleaser:{{ .Tag }}-arm64"
# - name_template: "ghcr.io/goreleaser/goreleaser:latest"
# image_templates:
# - "ghcr.io/goreleaser/goreleaser:{{ .Tag }}-amd64"
# - "ghcr.io/goreleaser/goreleaser:{{ .Tag }}-arm64"
dockers:
- image_templates:
- "openim/openim-chat:{{ .Tag }}-amd64"
- "ghcr.io/openimsdk/openim-chat:{{ .Tag }}-amd64"
dockerfile: Dockerfile
use: buildx
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"

- image_templates:
- "openim/openim-chat:{{ .Tag }}-arm64"
- "ghcr.io/openimsdk/openim-chat:{{ .Tag }}-arm64"
dockerfile: Dockerfile
use: buildx
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"
goarch: arm64


docker_manifests:
- name_template: "openim/openim-chat:{{ .Tag }}"
image_templates:
- "openim/openim-chat:{{ .Tag }}-amd64"
- "openim/openim-chat:{{ .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: "openim/openim-chat:latest"
image_templates:
- "openim/openim-chat:{{ .Tag }}-amd64"
- "openim/openim-chat:{{ .Tag }}-arm64"
- name_template: "ghcr.io/openimsdk/openim-chat:latest"
image_templates:
- "ghcr.io/openimsdk/openim-chat:{{ .Tag }}-amd64"
- "ghcr.io/openimsdk/openim-chat:{{ .Tag }}-arm64"

nfpms:
- id: packages
Expand Down

0 comments on commit 5801b3c

Please sign in to comment.