Skip to content

Commit 5b3f41e

Browse files
authored
Merge pull request #264 from Homebrew/sync-shared-config
Synchronize shared configuration
2 parents c4279ef + 4dda11b commit 5b3f41e

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

‎.github/workflows/actionlint.yml‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,29 @@ env:
2424
permissions: {}
2525

2626
jobs:
27+
brew_ruby:
28+
name: No brew ruby
29+
if: github.repository_owner == 'Homebrew'
30+
runs-on: ubuntu-latest
31+
permissions:
32+
contents: read
33+
steps:
34+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
35+
with:
36+
persist-credentials: false
37+
38+
- name: Check for `brew ruby`
39+
run: |
40+
status=0
41+
git grep --line-number --word-regexp --extended-regexp 'brew[[:space:]]+ruby' -- \
42+
.github ':(glob)**/action.yml' ':(glob)**/action.yaml' ':!.github/workflows/actionlint.yml' || status=$?
43+
if [[ "${status}" -eq 0 ]]
44+
then
45+
echo "::error::Use a dedicated brew command or Homebrew/actions/setup-ruby instead of \`brew ruby\`."
46+
exit 1
47+
fi
48+
[[ "${status}" -eq 1 ]]
49+
2750
workflow_syntax:
2851
if: github.repository_owner == 'Homebrew'
2952
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)