From f0346d811f0641b623549abd4a4e562c9a3356ae Mon Sep 17 00:00:00 2001 From: Josh Klar Date: Tue, 1 Aug 2023 17:46:56 -0700 Subject: [PATCH] ruby: Upgrade to v3.1.4 (pt. 1, base image only) (#19871) In #19776 we discovered that basing both the base container *and* the app container off of `.ruby-version` causes a chicken-and-egg problem wherein upgrading Ruby versions requires a few stop-and-gos. Let's make those stops reviewable as separate chunks instead: use a new `.ruby-version-next` for building base images, not the `.ruby-version`, thus allowing GitHub Actions to fire off an automated build (which, when complete, we can take the SHA sum from and use it to open a second PR updating the app image to use it, and `.ruby-version` can be updated to match `.ruby-version-next`). --- .ruby-version-next | 1 + scripts/build_base_ruby_image.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 .ruby-version-next diff --git a/.ruby-version-next b/.ruby-version-next new file mode 100644 index 000000000..0aec50e6e --- /dev/null +++ b/.ruby-version-next @@ -0,0 +1 @@ +3.1.4 diff --git a/scripts/build_base_ruby_image.sh b/scripts/build_base_ruby_image.sh index c6c0ed5d6..755e3dba4 100755 --- a/scripts/build_base_ruby_image.sh +++ b/scripts/build_base_ruby_image.sh @@ -9,7 +9,7 @@ if [ "$(pwd)" != "$(git rev-parse --show-toplevel)" ]; then fi BUILD_PLATFORMS="${BUILD_PLATFORMS:-linux/amd64,linux/arm64}" -RUBY_VERSION="${RUBY_VERSION:-$(cat .ruby-version)}" +RUBY_VERSION="${RUBY_VERSION:-$(cat .ruby-version-next)}" IMAGE="ghcr.io/forem/ruby:${RUBY_VERSION}" if [ -z "${SKIP_PUSH:-}" ]; then