Skip to content

Docker release action #94

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 5, 2025
Merged

Docker release action #94

merged 4 commits into from
Aug 5, 2025

Conversation

peteski22
Copy link
Contributor

@peteski22 peteski22 commented Jul 18, 2025

This PR updates our release pipeline to include mult-platform Docker builds.

$ goreleaser release --clean --snapshot --skip publish

  • skipping announce, publish, and validate...
  • cleaning distribution directory
  • loading environment variables
  • getting and validating git state
    • git state                                      commit=0fb545d9bf7c2d5002001f9b49e5235086811eab branch=peteski22/92/release-docker current_tag=v0.0.2 previous_tag=v0.0.1 dirty=true
    • pipe skipped or partially skipped              reason=disabled during snapshot mode
  • parsing tag
  • setting defaults
  • snapshotting
    • building snapshot...                           version=0.0.2-SNAPSHOT-0fb545d
  • running before hooks
    • running                                        hook=go mod tidy
    • running                                        hook=go generate ./...
  • ensuring distribution directory
  • setting up metadata
  • writing release metadata
  • loading go mod information
  • build prerequisites
  • building binaries
    • building                                       binary=dist/mcpd_darwin_arm64_v8.0/mcpd
    • building                                       binary=dist/mcpd_windows_amd64_v1/mcpd.exe
    • building                                       binary=dist/mcpd_windows_arm64_v8.0/mcpd.exe
    • building                                       binary=dist/mcpd_linux_arm64_v8.0/mcpd
    • building                                       binary=dist/mcpd_darwin_amd64_v1/mcpd
    • building                                       binary=dist/mcpd_linux_amd64_v1/mcpd
  • archives
    • archiving                                      name=dist/mcpd_Linux_x86_64.tar.gz
    • archiving                                      name=dist/mcpd_Windows_x86_64.zip
    • archiving                                      name=dist/mcpd_Darwin_x86_64.tar.gz
    • archiving                                      name=dist/mcpd_Windows_arm64.zip
    • archiving                                      name=dist/mcpd_Linux_arm64.tar.gz
    • archiving                                      name=dist/mcpd_Darwin_arm64.tar.gz
  • calculating checksums
  • homebrew cask
    • writing                                        cask=dist/homebrew/Casks/mcpd.rb
  • docker images
    • building docker image                          image=mzdotai/mcpd:v0.0.2-arm64
    • building docker image                          image=mzdotai/mcpd:v0.0.2-amd64
  • writing artifacts metadata
  • release succeeded after 7s
  • thanks for using GoReleaser!

Images built locally:

$ docker image ls | grep mzdotai/mcpd

mzdotai/mcpd            latest-arm64                   3f20610ad04b   About a minute ago   274MB
mzdotai/mcpd            v0.0.2-arm64                   3f20610ad04b   About a minute ago   274MB
mzdotai/mcpd            latest-amd64                   abebad3c2231   About a minute ago   281MB
mzdotai/mcpd            v0.0.2-amd64                   abebad3c2231   About a minute ago   281MB

When we do publish then the multi-platform manifest should be pushed to DockerHub to handle latest.

See releases available at: https://github.com/mozilla-ai/mcpd/releases

@peteski22 peteski22 force-pushed the peteski22/92/release-docker branch from d62bd44 to 04773c2 Compare July 18, 2025 23:01
@peteski22 peteski22 requested review from agpituk and macaab26 July 18, 2025 23:02
@peteski22 peteski22 marked this pull request as ready for review July 18, 2025 23:02
@peteski22 peteski22 force-pushed the peteski22/92/release-docker branch from 04773c2 to 8d4fe55 Compare August 4, 2025 13:50
GitHub Action:

* Deleted docker relase action in favour of using GoReleaser for Docker too
* In the 'release binary' ...
  * Renamed to more generic 'release.yaml' as we do more than the binary now
  * Removed 'skip announce', as we haven't got anything configured,  added skip flags for homebrew and docker
  * Added the steps required for Docker builds in GoReleaser

GoReleaser config:

* Updated to add docker config for multi-platform builds

Dockerfile:

* Drop version arg and push via pipeline in GoReleaser for label metadata
* Allow more env vars to be used to configure log path, config and runtime fiile

docker-compose:

* Ditched .env file as it's required if you don't want an error
* Ditched 'args' as unneeded, matched the env vars  and defaults with Dockerfile for clarity
@peteski22 peteski22 force-pushed the peteski22/92/release-docker branch from 0fb545d to 3851cd7 Compare August 4, 2025 15:59
@peteski22 peteski22 merged commit f9d6726 into main Aug 5, 2025
2 checks passed
@peteski22 peteski22 deleted the peteski22/92/release-docker branch August 5, 2025 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants