From 9a28a963abf33e966047f73ad7e665c0453c99a8 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Tue, 11 Jun 2024 13:43:53 +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..9df5cc0f 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.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?