From 50c4a1b349f797b29fab2fd86bf9cc976c4648e4 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Tue, 11 Jun 2024 14:24:08 +0100 Subject: [PATCH] actions/sync/shared-config: update Gemfile.lock if it exists. This avoids the need to manually update this file in every repository. --- .github/actions/sync/shared-config.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/actions/sync/shared-config.rb b/.github/actions/sync/shared-config.rb index 3ff3d864..b24d7f46 100755 --- a/.github/actions/sync/shared-config.rb +++ b/.github/actions/sync/shared-config.rb @@ -173,6 +173,13 @@ def git(*args) end end +# Update Gemfile.lock if it exists, based on the Ruby version. +if (target_directory_path/"Gemfile.lock").exist? + target_directory_path.cd do + system "bundle", "install" + end +end + out, err, status = Open3.capture3("git", "-C", target_directory, "status", "--porcelain", "--ignore-submodules=dirty") raise err unless status.success?