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

Commit 838506a

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

File tree

1 file changed

+86
-0
lines changed

1 file changed

+86
-0
lines changed

.github/workflows/actionlint.yml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
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+
steps:
35+
- name: Set up Homebrew
36+
id: setup-homebrew
37+
uses: Homebrew/actions/setup-homebrew@master
38+
with:
39+
core: false
40+
cask: false
41+
test-bot: false
42+
43+
- name: Install tools
44+
run: brew install actionlint shellcheck zizmor
45+
46+
- uses: actions/checkout@v4
47+
with:
48+
persist-credentials: ${{ github.event.repository.private }}
49+
50+
- run: zizmor --format sarif . >results.sarif
51+
52+
- name: Upload SARIF file
53+
uses: actions/upload-artifact@v4
54+
with:
55+
name: results.sarif
56+
path: results.sarif
57+
58+
- name: Set up actionlint
59+
run: echo "::add-matcher::$(brew --repository)/.github/actionlint-matcher.json"
60+
61+
- run: actionlint
62+
63+
upload_sarif:
64+
needs: workflow_syntax
65+
# We want to always upload this even if `actionlint` failed.
66+
# This is only available on public repositories.
67+
if: >
68+
always() &&
69+
!contains(fromJSON('[["cancelled", "skipped"]]'), needs.workflow_syntax.result) &&
70+
!github.repository.private
71+
runs-on: ubuntu-latest
72+
permissions:
73+
contents: read
74+
security-events: write
75+
steps:
76+
- name: Download SARIF file
77+
uses: actions/download-artifact@v4
78+
with:
79+
name: results.sarif
80+
path: results.sarif
81+
82+
- name: Upload SARIF file
83+
uses: github/codeql-action/upload-sarif@v3
84+
with:
85+
sarif_file: results.sarif
86+
category: zizmor

0 commit comments

Comments
 (0)