Skip to content

Commit

Permalink
actions/sync/shared-config: update Gemfile.lock if it exists.
Browse files Browse the repository at this point in the history
This avoids the need to manually update this file in every repository.
  • Loading branch information
MikeMcQuaid committed Jun 11, 2024
1 parent db15d1d commit c283874
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/actions/sync/shared-config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,14 @@ def git(*args)
end
end

# Update Gemfile.lock if it exists, based on the Ruby version.
if (target_directory_path/"Gemfile.lock").exist?
Dir.chdir target_directory_path do
puts "Running bundle install..."
system "bundle install --quiet >/dev/null"
end
end

out, err, status = Open3.capture3("git", "-C", target_directory, "status", "--porcelain", "--ignore-submodules=dirty")
raise err unless status.success?

Expand Down

0 comments on commit c283874

Please sign in to comment.