Skip to content

Commit

Permalink
sync-shared-config: sync private repos.
Browse files Browse the repository at this point in the history
This requires using a token.
  • Loading branch information
MikeMcQuaid committed May 24, 2024
1 parent 028032a commit 5b152ee
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/actions/sync/shared-config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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)
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/sync-shared-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 5b152ee

Please sign in to comment.