Skip to content

Commit

Permalink
Merge pull request #62 from Homebrew/sync-shared-config
Browse files Browse the repository at this point in the history
Synchronize shared configuration
  • Loading branch information
p-linnane authored Dec 16, 2024
2 parents 6d8e86d + 71891d7 commit 7918d78
Show file tree
Hide file tree
Showing 5 changed files with 104 additions and 9 deletions.
85 changes: 85 additions & 0 deletions .github/workflows/actionlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# This file is synced from the `.github` repository, do not modify it directly.
name: Actionlint

on:
push:
branches:
- main
- master
pull_request:
merge_group:

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

concurrency:
group: "actionlint-${{ github.ref }}"
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

env:
HOMEBREW_DEVELOPER: 1
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_ENV_HINTS: 1

permissions: {}

jobs:
workflow_syntax:
if: github.repository_owner == 'Homebrew'
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Set up Homebrew
id: setup-homebrew
uses: Homebrew/actions/setup-homebrew@master
with:
core: false
cask: false
test-bot: false

- name: Install tools
run: brew install actionlint shellcheck zizmor

- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false

- run: zizmor --format sarif . > results.sarif

- name: Upload SARIF file
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: results.sarif
path: results.sarif

- name: Set up actionlint
run: echo "::add-matcher::$(brew --repository)/.github/actionlint-matcher.json"

- run: actionlint

upload_sarif:
needs: workflow_syntax
# We want to always upload this even if `actionlint` failed.
# This is only available on public repositories.
if: >
always() &&
!contains(fromJSON('["cancelled", "skipped"]'), needs.workflow_syntax.result) &&
!github.event.repository.private
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
steps:
- name: Download SARIF file
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: results.sarif
path: results.sarif

- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@df409f7d9260372bd5f19e5b04e83cb3c43714ae # v3.27.9
with:
sarif_file: results.sarif
category: zizmor
1 change: 1 addition & 0 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
persist-credentials: false

- name: Cache Bundler RubyGems
id: cache
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: ${{ steps.set-up-homebrew.outputs.gems-path }}
Expand Down
17 changes: 13 additions & 4 deletions .github/workflows/stale-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ on:
- cron: "0 0 * * *"
issue_comment:

permissions:
contents: write
issues: write
pull-requests: write
permissions: {}

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

concurrency:
group: stale-issues
Expand All @@ -31,6 +32,10 @@ jobs:
)
)
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
steps:
- name: Mark/Close Stale Issues and Pull Requests
uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9.0.0
Expand All @@ -57,6 +62,10 @@ jobs:
)
)
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
steps:
- name: Mark/Close Stale `bump-formula-pr` and `bump-cask-pr` Pull Requests
uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9.0.0
Expand Down
8 changes: 4 additions & 4 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ AllCops:
- "**/*.rbi"
Exclude:
- Homebrew/sorbet/rbi/{dsl,gems}/**/*.rbi
- Homebrew/sorbet/rbi/parlour.rbi
- Homebrew/bin/*
- Homebrew/vendor/**/*
- Taps/*/*/vendor/**/*
- "**/vendor/**/*"
SuggestExtensions:
rubocop-minitest: false
Layout/ArgumentAlignment:
Expand Down Expand Up @@ -169,7 +169,7 @@ Style/InvertibleUnlessCondition:
Enabled: true
InverseMethods:
:==: :!=
:zero?:
:zero?:
:blank?: :present?
Style/MutableConstant:
EnforcedStyle: strict
Expand All @@ -183,12 +183,12 @@ Style/NumericLiterals:
Style/OpenStructUse:
Exclude:
- Taps/**/*
- Homebrew/cli/args.rb
- Homebrew/cli/args.rbi
Style/OptionalBooleanParameter:
AllowedMethods:
- respond_to?
- respond_to_missing?
Style/RedundantLineContinuation:
Enabled: false
Style/RescueStandardError:
EnforcedStyle: implicit
Style/ReturnNil:
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.3.4
3.3.6

0 comments on commit 7918d78

Please sign in to comment.