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

Commit ada61eb

Browse files
committed
actionlint.yml: update to match main configuration
1 parent 4eb6101 commit ada61eb

File tree

1 file changed

+88
-0
lines changed

1 file changed

+88
-0
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

0 commit comments

Comments
 (0)