Skip to content
This repository was archived by the owner on Feb 7, 2025. It is now read-only.

Commit 51945a5

Browse files
authored
Merge pull request #97 from Homebrew/sync-shared-config
2 parents 4eb6101 + 29c6a0d commit 51945a5

File tree

2 files changed

+97
-4
lines changed

2 files changed

+97
-4
lines changed

.github/workflows/actionlint.yml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# This file is synced from the `.github` repository, do not modify it directly.
2+
name: Actionlint
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
- master
9+
paths:
10+
- '.github/workflows/*.ya?ml'
11+
pull_request:
12+
paths:
13+
- '.github/workflows/*.ya?ml'
14+
15+
defaults:
16+
run:
17+
shell: bash -xeuo pipefail {0}
18+
19+
concurrency:
20+
group: "actionlint-${{ github.ref }}"
21+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
22+
23+
env:
24+
HOMEBREW_DEVELOPER: 1
25+
HOMEBREW_NO_AUTO_UPDATE: 1
26+
HOMEBREW_NO_ENV_HINTS: 1
27+
28+
permissions: {}
29+
30+
jobs:
31+
workflow_syntax:
32+
if: github.repository_owner == 'Homebrew'
33+
runs-on: ubuntu-latest
34+
permissions:
35+
contents: read
36+
steps:
37+
- name: Set up Homebrew
38+
id: setup-homebrew
39+
uses: Homebrew/actions/setup-homebrew@master
40+
with:
41+
core: false
42+
cask: false
43+
test-bot: false
44+
45+
- name: Install tools
46+
run: brew install actionlint shellcheck zizmor
47+
48+
- uses: actions/checkout@v4
49+
with:
50+
persist-credentials: false
51+
52+
- run: zizmor --format sarif . >results.sarif
53+
54+
- name: Upload SARIF file
55+
uses: actions/upload-artifact@v4
56+
with:
57+
name: results.sarif
58+
path: results.sarif
59+
60+
- name: Set up actionlint
61+
run: echo "::add-matcher::$(brew --repository)/.github/actionlint-matcher.json"
62+
63+
- run: actionlint
64+
65+
upload_sarif:
66+
needs: workflow_syntax
67+
# We want to always upload this even if `actionlint` failed.
68+
# This is only available on public repositories.
69+
if: >
70+
always() &&
71+
!contains(fromJSON('[["cancelled", "skipped"]]'), needs.workflow_syntax.result) &&
72+
!github.event.repository.private
73+
runs-on: ubuntu-latest
74+
permissions:
75+
contents: read
76+
security-events: write
77+
steps:
78+
- name: Download SARIF file
79+
uses: actions/download-artifact@v4
80+
with:
81+
name: results.sarif
82+
path: results.sarif
83+
84+
- name: Upload SARIF file
85+
uses: github/codeql-action/upload-sarif@v3
86+
with:
87+
sarif_file: results.sarif
88+
category: zizmor

.github/workflows/stale-issues.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@ on:
1212
- cron: "0 0 * * *"
1313
issue_comment:
1414

15-
permissions:
16-
contents: write
17-
issues: write
18-
pull-requests: write
15+
permissions: {}
1916

2017
defaults:
2118
run:
@@ -35,6 +32,10 @@ jobs:
3532
)
3633
)
3734
runs-on: ubuntu-latest
35+
permissions:
36+
contents: write
37+
issues: write
38+
pull-requests: write
3839
steps:
3940
- name: Mark/Close Stale Issues and Pull Requests
4041
uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9
@@ -61,6 +62,10 @@ jobs:
6162
)
6263
)
6364
runs-on: ubuntu-latest
65+
permissions:
66+
contents: write
67+
issues: write
68+
pull-requests: write
6469
steps:
6570
- name: Mark/Close Stale `bump-formula-pr` and `bump-cask-pr` Pull Requests
6671
uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9

0 commit comments

Comments
 (0)