AAE-47554 Add actionlint to pre-commit config

This commit is contained in:
andrphilippi
2026-09-03 13:59:47 +02:00
parent 6f2d7813b9
commit c79d4b6ddf
4 changed files with 49 additions and 1 deletions
+2
View File
@@ -1 +1,3 @@
.github/workflows/*.lock.yml linguist-generated=true merge=ours
*.sh text eol=lf
.husky/* text eol=lf
+34
View File
@@ -0,0 +1,34 @@
name: "pre-commit"
on:
pull_request:
branches:
- develop
- master
- develop-patch*
- master-patch*
paths:
- '.github/workflows/**'
- '.github/actions/**'
- '.pre-commit-config.yaml'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
pre-commit:
name: "Run pre-commit hooks"
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Run pre-commit
uses: Alfresco/alfresco-build-tools/.github/actions/pre-commit@da99ab845e78301fcb0680d16cbc185a40a1938c # v18.24.1
with:
skip_checkout: true
+7 -1
View File
@@ -2,4 +2,10 @@
export NODE_OPTIONS=--max_old_space_size=8192
lint-staged
lint-staged || exit 1
if command -v pre-commit >/dev/null 2>&1; then
pre-commit run
else
echo "pre-commit not found on PATH - skipping workflow lint locally (CI enforces it). Install: https://pre-commit.com/#install"
fi
+6
View File
@@ -0,0 +1,6 @@
repos:
- repo: https://github.com/rhysd/actionlint
rev: 914e7df21a07ef503a81201c76d2b11c789d3fca # frozen: v1.7.12
hooks:
- id: actionlint
exclude: '\.lock\.yml$'