From 761d4f7e4fccaac80581b54ff9d582ee3f3ab644 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Tue, 11 Jun 2024 17:11:28 +0100 Subject: [PATCH] sync-shared-config: fix style and style checks. - Use `exclude?` instead of `include?` to make RuboCop happy - Properly check the `sync` jobs success so that auto-merge is not run if jobs are failing --- .github/actions/sync/shared-config.rb | 2 +- .github/workflows/sync-shared-config.yml | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/actions/sync/shared-config.rb b/.github/actions/sync/shared-config.rb index b6b4992e..9e3f3489 100755 --- a/.github/actions/sync/shared-config.rb +++ b/.github/actions/sync/shared-config.rb @@ -175,7 +175,7 @@ def git(*args) end # Update Gemfile.lock if it exists, based on the Ruby version. -if !custom_ruby_version_repos.include?(repository_name) && (target_directory_path/"Gemfile.lock").exist? +if custom_ruby_version_repos.exclude?(repository_name) && (target_directory_path/"Gemfile.lock").exist? Dir.chdir target_directory_path do puts "Running bundle install..." system "bundle update --ruby --bundler --quiet >/dev/null" diff --git a/.github/workflows/sync-shared-config.yml b/.github/workflows/sync-shared-config.yml index 222e0b33..d95f88bf 100644 --- a/.github/workflows/sync-shared-config.yml +++ b/.github/workflows/sync-shared-config.yml @@ -115,6 +115,7 @@ jobs: conclusion: needs: sync runs-on: ubuntu-latest + if: always() steps: - - name: Conclusion - run: echo "Sync shared configurations completed" + - name: Result + run: ${{ needs.sync.result == 'success' }}