Skip to content

Build Ruby images for multiple versions#1

Merged
baelter merged 5 commits intomainfrom
ruby-version-matrix
Mar 11, 2026
Merged

Build Ruby images for multiple versions#1
baelter merged 5 commits intomainfrom
ruby-version-matrix

Conversation

@baelter
Copy link
Copy Markdown
Member

@baelter baelter commented Mar 11, 2026

Summary

  • Matrix builds one image per Ruby version: 3.3.10, 3.4.8, 4.0.1
  • Tagged by exact version only (no latest, no minor aliases)
  • To add a new version, add it to the matrix array

Tags

  • ghcr.io/84codes/images/ruby:3.3.10
  • ghcr.io/84codes/images/ruby:3.4.8
  • ghcr.io/84codes/images/ruby:4.0.1

Test plan

  • Trigger workflow_dispatch, verify 3 images are built
  • Pull ruby:3.4.8, verify Ruby version and build tools are present
  • Build a downstream app Dockerfile using the image

baelter added 2 commits March 11, 2026 10:31
Matrix builds latest patches of each supported minor (3.4.8, 3.3.7).
Each version produces two images:
- ruby:<version> (runtime: slim + curl + postgresql-client)
- ruby:<version>-build (runtime + build-essential, git, libpq-dev, etc.)

Also tags minor aliases (ruby:3.4, ruby:3.4-build) and latest.
One image with build tools included. Simpler to maintain, and the
size difference doesn't matter for Heroku apps.

Tags: ruby:3.4.8, ruby:3.4, ruby:latest (+ 3.3.7, 3.3)
@baelter baelter changed the title Build Ruby images for multiple versions with runtime/build split Build Ruby images for multiple versions Mar 11, 2026
@baelter baelter marked this pull request as ready for review March 11, 2026 09:40
@baelter baelter requested a review from dentarg March 11, 2026 09:40
@dentarg
Copy link
Copy Markdown
Contributor

dentarg commented Mar 11, 2026

I will push my feedback here in a second

@dentarg
Copy link
Copy Markdown
Contributor

dentarg commented Mar 11, 2026

Should we use latest tag at all? I think it is probably good to be clear with what version is being used, even down to the third number. So I'm in favor of skipping these aliases too

@baelter
Copy link
Copy Markdown
Member Author

baelter commented Mar 11, 2026

Should we use latest tag at all? I think it is probably good to be clear with what version is being used, even down to the third number. So I'm in favor of skipping these aliases too

Sure! You pushing or should I?

- No need to repeat 3.4.8
- Make the list diff friendly
- Add 4.0.1
- Build latest 3.3
@dentarg
Copy link
Copy Markdown
Contributor

dentarg commented Mar 11, 2026

You can push that change, I just pushed my matrix feedback :)

Explicit versions only: ruby:3.3.10, ruby:3.4.8, ruby:4.0.1.
No latest, no minor aliases. Apps pin the exact version they need.
Comment thread .github/workflows/ruby.yml Outdated
@baelter baelter merged commit a0f4f68 into main Mar 11, 2026
5 checks passed
@baelter baelter deleted the ruby-version-matrix branch March 11, 2026 09:58
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