mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
AAE-47554 Add actionlint to pre-commit config
This commit is contained in:
@@ -1 +1,3 @@
|
||||
.github/workflows/*.lock.yml linguist-generated=true merge=ours
|
||||
*.sh text eol=lf
|
||||
.husky/* text eol=lf
|
||||
|
||||
@@ -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
@@ -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
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
repos:
|
||||
- repo: https://github.com/rhysd/actionlint
|
||||
rev: 914e7df21a07ef503a81201c76d2b11c789d3fca # frozen: v1.7.12
|
||||
hooks:
|
||||
- id: actionlint
|
||||
exclude: '\.lock\.yml$'
|
||||
Reference in New Issue
Block a user