From 5b152ee0c08a211b9aae671189fa8c6a891a5bd6 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Fri, 24 May 2024 19:14:00 +0100 Subject: [PATCH] sync-shared-config: sync private repos. This requires using a token. --- .github/actions/sync/shared-config.rb | 7 +++++++ .github/workflows/sync-shared-config.yml | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/.github/actions/sync/shared-config.rb b/.github/actions/sync/shared-config.rb index cb3c90d6..de5e865c 100755 --- a/.github/actions/sync/shared-config.rb +++ b/.github/actions/sync/shared-config.rb @@ -40,13 +40,18 @@ def git(*args) key.match?(%r{\Arequire|inherit_from|inherit_mode|Cask/|Formula|Homebrew|Performance/|RSpec|Sorbet/}) end.to_yaml +custom_ruby_version_repos = %w[ + mass-bottling-tracker-private +].freeze custom_rubocop_repos = %w[ ci-orchestrator + mass-bottling-tracker-private orka_api_client ruby-macho ].freeze custom_dependabot_repos = %w[ brew + brew-pip-audit ci-orchestrator ].freeze @@ -63,6 +68,8 @@ def git(*args) case file when ruby_version + next if custom_ruby_version_repos.include?(repository_name) + target_path.write("#{homebrew_ruby_version}\n") when rubocop_yml next if custom_rubocop_repos.include?(repository_name) diff --git a/.github/workflows/sync-shared-config.yml b/.github/workflows/sync-shared-config.yml index eb9be2df..5bae377f 100644 --- a/.github/workflows/sync-shared-config.yml +++ b/.github/workflows/sync-shared-config.yml @@ -44,6 +44,10 @@ jobs: - Homebrew/orka_api_client - Homebrew/ruby-macho - Homebrew/rubydoc.brew.sh + - Homebrew/mass-bottling-tracker-private + - Homebrew/governance-private + - Homebrew/security-private + - Homebrew/ops-private fail-fast: false steps: - name: Set up Homebrew @@ -70,6 +74,7 @@ jobs: with: repository: ${{ matrix.repo }} path: vendor/${{ matrix.repo }} + token: ${{ secrets.HOMEBREW_DOTGITHUB_WORKFLOW_TOKEN }} persist-credentials: false - name: Configure Git user