Skip to content

Commit

Permalink
Merge pull request #184 from Homebrew/sync-improvements
Browse files Browse the repository at this point in the history
sync-shared-config: various improvements
  • Loading branch information
MikeMcQuaid authored Sep 24, 2024
2 parents 876442f + 65fd7ad commit 2dce8ec
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/sync-shared-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:
permissions:
contents: read

defaults:
run:
shell: bash -xeuo pipefail {0}

concurrency:
group: "sync-shared-config-${{ github.ref }}"
cancel-in-progress: true
Expand Down Expand Up @@ -62,12 +66,12 @@ jobs:
persist-credentials: false

- run: brew install-bundler-gems --groups=style
if: ${{ matrix.repo == 'Homebrew/.github' }}
if: matrix.repo == 'Homebrew/.github'
env:
HOMEBREW_DEVELOPER: 1

- run: brew style .github/actions/sync/*.rb
if: ${{ matrix.repo == 'Homebrew/.github' }}
if: matrix.repo == 'Homebrew/.github'
env:
HOMEBREW_DEVELOPER: 1

Expand Down Expand Up @@ -103,13 +107,13 @@ jobs:
run: ./.github/actions/sync/shared-config.rb 'target/${{ matrix.repo }}' '/home/linuxbrew/.linuxbrew/Homebrew'

- name: Create pull request
if: ${{ github.ref == 'refs/heads/master' && steps.detect_changes.outputs.pull_request == 'true' }}
if: github.ref == 'refs/heads/master' && steps.detect_changes.outputs.pull_request == 'true'
run: |
set -euo pipefail
cd target/${{ matrix.repo }}
cd "target/$GH_REPO"
git checkout -b sync-shared-config
# Stagger network calls over the next 10 minutes to minimise errors.
sleep "$(( RANDOM % 60 * 10 ))"
if gh api \
-X GET \
--header 'Accept: application/vnd.github+json' \
Expand Down

0 comments on commit 2dce8ec

Please sign in to comment.