Skip to content

Commit 329f527

Browse files
pdabelf5AlexFenlon
authored andcommitted
Add actionlint pre commit plugin (#5839)
1 parent aab1e7d commit 329f527

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

.github/workflows/build-oss.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ jobs:
4444
runs-on: ubuntu-22.04
4545
permissions:
4646
contents: read # for docker/build-push-action to read repo content
47-
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
4847
id-token: write # for OIDC login to GCR
4948
packages: write # for docker/build-push-action to push to GHCR
5049
pull-requests: write # for scout report

.github/workflows/ci.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,6 @@ jobs:
306306
permissions:
307307
contents: read
308308
actions: read
309-
security-events: write
310309
id-token: write
311310
packages: write
312311
pull-requests: write # for scout report
@@ -331,7 +330,6 @@ jobs:
331330
full-build: ${{ inputs.force && inputs.force || false }}
332331
permissions:
333332
contents: read
334-
security-events: write
335333
id-token: write
336334
pull-requests: write # for scout report
337335
secrets: inherit
@@ -356,8 +354,7 @@ jobs:
356354
full-build: ${{ inputs.force && inputs.force || false }}
357355
permissions:
358356
contents: read
359-
security-events: write
360-
id-token: write
357+
id-token: write # gcr login
361358
pull-requests: write # for scout report
362359
secrets: inherit
363360

.pre-commit-config.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,5 +77,17 @@ repos:
7777
hooks:
7878
- id: markdownlint-cli2
7979

80+
- repo: https://github.com/rhysd/actionlint
81+
rev: v1.7.1
82+
hooks:
83+
- id: actionlint
84+
name: Lint GitHub Actions workflow files
85+
description: Runs actionlint to lint GitHub Actions workflow files
86+
language: golang
87+
types: ["yaml"]
88+
files: ^\.github/workflows/
89+
entry: actionlint
90+
args: ["-shellcheck",""]
91+
8092
ci:
8193
skip: [golang-diff, golangci-lint, check-jsonschema, markdownlint-cli2]

0 commit comments

Comments
 (0)