Skip to content

Commit

Permalink
feat(ops/gnobro): introducing Release workflow for the Gnobro tool (g…
Browse files Browse the repository at this point in the history
…nolang#2872)

Adding support for releasing the image of Gnobro

Facilitates gnolang#2807 

<details><summary>Contributors' checklist...</summary>

- [*] Added new tests, or not needed, or not feasible
- [*] Provided an example (e.g. screenshot) to aid review or the PR is
self-explanatory
- [*] Updated the official documentation or not needed
- [*] No breaking changes were made, or a `BREAKING CHANGE: xxx` message
was included in the description
- [*] Added references to related issues and PRs
- [*] Provided any useful hints for running manual tests
</details>
  • Loading branch information
sw360cab authored Sep 30, 2024
1 parent 69400d4 commit 01d9e8d
Show file tree
Hide file tree
Showing 2 changed files with 105 additions and 2 deletions.
97 changes: 97 additions & 0 deletions .github/goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,21 @@ builds:
goarm:
- 6
- 7
- id: gnobro
dir: ./contribs/gnodev/cmd/gnobro
binary: gnobro
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
goarch:
- amd64
- arm64
- arm
goarm:
- 6
- 7

gomod:
proxy: true
Expand Down Expand Up @@ -489,6 +504,74 @@ dockers:
ids:
- gnofaucet

# gnobro
- use: buildx
dockerfile: Dockerfile.release
goos: linux
goarch: amd64
image_templates:
- "ghcr.io/gnolang/{{ .ProjectName }}/gnobro:{{ .Version }}-amd64"
- "ghcr.io/gnolang/{{ .ProjectName }}/gnobro:{{ .Env.TAG_VERSION }}-amd64"
build_flag_templates:
- "--target=gnobro"
- "--platform=linux/amd64"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}/gnobro"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
ids:
- gnobro
- use: buildx
dockerfile: Dockerfile.release
goos: linux
goarch: arm64
image_templates:
- "ghcr.io/gnolang/{{ .ProjectName }}/gnobro:{{ .Version }}-arm64v8"
- "ghcr.io/gnolang/{{ .ProjectName }}/gnobro:{{ .Env.TAG_VERSION }}-arm64v8"
build_flag_templates:
- "--target=gnobro"
- "--platform=linux/arm64/v8"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}/gnobro"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
ids:
- gnobro
- use: buildx
dockerfile: Dockerfile.release
goos: linux
goarch: arm
goarm: 6
image_templates:
- "ghcr.io/gnolang/{{ .ProjectName }}/gnobro:{{ .Version }}-armv6"
- "ghcr.io/gnolang/{{ .ProjectName }}/gnobro:{{ .Env.TAG_VERSION }}-armv6"
build_flag_templates:
- "--target=gnobro"
- "--platform=linux/arm/v6"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}/gnobro"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
ids:
- gnobro
- use: buildx
dockerfile: Dockerfile.release
goos: linux
goarch: arm
goarm: 7
image_templates:
- "ghcr.io/gnolang/{{ .ProjectName }}/gnobro:{{ .Version }}-armv7"
- "ghcr.io/gnolang/{{ .ProjectName }}/gnobro:{{ .Env.TAG_VERSION }}-armv7"
build_flag_templates:
- "--target=gnobro"
- "--platform=linux/arm/v7"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}/gnobro"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
ids:
- gnobro

docker_manifests:
# https://goreleaser.com/customization/docker_manifest/

Expand Down Expand Up @@ -562,6 +645,20 @@ docker_manifests:
- ghcr.io/gnolang/{{ .ProjectName }}/gnofaucet:{{ .Env.TAG_VERSION }}-armv6
- ghcr.io/gnolang/{{ .ProjectName }}/gnofaucet:{{ .Env.TAG_VERSION }}-armv7

# gnobro
- name_template: ghcr.io/gnolang/{{ .ProjectName }}/gnobro:{{ .Version }}
image_templates:
- ghcr.io/gnolang/{{ .ProjectName }}/gnobro:{{ .Version }}-amd64
- ghcr.io/gnolang/{{ .ProjectName }}/gnobro:{{ .Version }}-arm64v8
- ghcr.io/gnolang/{{ .ProjectName }}/gnobro:{{ .Version }}-armv6
- ghcr.io/gnolang/{{ .ProjectName }}/gnobro:{{ .Version }}-armv7
- name_template: ghcr.io/gnolang/{{ .ProjectName }}/gnobro:{{ .Env.TAG_VERSION }}
image_templates:
- ghcr.io/gnolang/{{ .ProjectName }}/gnobro:{{ .Env.TAG_VERSION }}-amd64
- ghcr.io/gnolang/{{ .ProjectName }}/gnobro:{{ .Env.TAG_VERSION }}-arm64v8
- ghcr.io/gnolang/{{ .ProjectName }}/gnobro:{{ .Env.TAG_VERSION }}-armv6
- ghcr.io/gnolang/{{ .ProjectName }}/gnobro:{{ .Env.TAG_VERSION }}-armv7

docker_signs:
- cmd: cosign
env:
Expand Down
10 changes: 8 additions & 2 deletions Dockerfile.release
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,13 @@ EXPOSE 26656 26657

ENTRYPOINT [ "/usr/bin/gnoland" ]


#
## ghcr.io/gnolang/gno/gnokey
FROM base as gnokey

COPY ./gnokey /usr/bin/gnokey
ENTRYPOINT [ "/usr/bin/gnokey" ]


#
## ghcr.io/gnolang/gno/gnoweb
FROM base as gnoweb
Expand All @@ -43,6 +41,14 @@ COPY ./gnofaucet /usr/bin/gnofaucet
EXPOSE 5050
ENTRYPOINT [ "/usr/bin/gnofaucet" ]

#
## ghcr.io/gnolang/gno/gnobro
FROM base as gnobro

COPY ./gnobro /usr/bin/gnobro
EXPOSE 22
ENTRYPOINT [ "/usr/bin/gnobro" ]

#
## ghcr.io/gnolang/gno
FROM base as gno
Expand Down

0 comments on commit 01d9e8d

Please sign in to comment.