From 01d9e8d6337a341344b83002950b42fa05989946 Mon Sep 17 00:00:00 2001 From: Sergio Maria Matone Date: Mon, 30 Sep 2024 15:57:14 +0200 Subject: [PATCH] feat(ops/gnobro): introducing Release workflow for the Gnobro tool (#2872) Adding support for releasing the image of Gnobro Facilitates #2807
Contributors' checklist... - [*] 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
--- .github/goreleaser.yaml | 97 +++++++++++++++++++++++++++++++++++++++++ Dockerfile.release | 10 ++++- 2 files changed, 105 insertions(+), 2 deletions(-) diff --git a/.github/goreleaser.yaml b/.github/goreleaser.yaml index 1984493d36f..cd3c62c2ae6 100644 --- a/.github/goreleaser.yaml +++ b/.github/goreleaser.yaml @@ -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 @@ -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/ @@ -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: diff --git a/Dockerfile.release b/Dockerfile.release index 644f8cb5de9..4887857b5c2 100644 --- a/Dockerfile.release +++ b/Dockerfile.release @@ -18,7 +18,6 @@ EXPOSE 26656 26657 ENTRYPOINT [ "/usr/bin/gnoland" ] - # ## ghcr.io/gnolang/gno/gnokey FROM base as gnokey @@ -26,7 +25,6 @@ FROM base as gnokey COPY ./gnokey /usr/bin/gnokey ENTRYPOINT [ "/usr/bin/gnokey" ] - # ## ghcr.io/gnolang/gno/gnoweb FROM base as gnoweb @@ -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